Subject Re: [firebird-support] Right-padded char fields?
Author Adriano dos Santos Fernandes
Kjell Rilbe escreveu:
> Hi,
>
> In a databse with default charset UTF8 I have a couple of char(1) and
> char(2) columns. I know these are implemented as char(4) and char(8)
> behind the scenes to make room for the "worst case" encoding in UTF8,
> but it seems that this shines through a bit too much.
>
> In FlameRobin a select on these columns the displayed data is
> right-padded with 3 and 6 spaces respectively.
>
> Is this:
>
> 1. A Firebird bug?
>
> 2. A Firebird "feature" (= as designed)? (Why?)
>
> 3. A FlameRobin bug?
>
> I don't like it.
>
Nor I am. But this requires API change or change on how things are
described to the client.

Basically, we need that CHAR datatype be described with a "length of
data" field, like VARCHAR is. This could be accomplished describing CHAR
as VARCHAR with a flag or with a new SQL_TYPE. Both ways may impact
client components.


Adriano