Subject Re: [firebird-support] Right-padded char fields?
Author Kjell Rilbe
Ivan Prenosil wrote:

> > Could you add a new SQL_TYPE with the new "length of data" but let FB
>
> Why ? You are talking about CHAR datatype, i.e. fixed number of characters.
> For UTF8 you can simply compute
>
> number of characters = buffer length / 4
>
> Is it not enough for your needs ?

Not sure to whom you're talking Ivan. I was told by Adriano that to be
able to tell the client the actual data length it would require a new
SQL_TYPE. That's what I responded to.

I assume the clients can strip the superfluous blanks (codepoints beyond
the specified char(n) length n), but it seems like an odd thing to
require from clients. If a column is supposed to contain n codepoints
you shouldn't get up to n*4 codepoints returned from the API. It's
counter intuitive.

The only reason I can see to do it like that is to maintain backward
compatibility in the API, and that is the problem I humbly suggested a
solution to.

Also, your reply came across as rather accusative or degrading, as if I
was making silly unreasonable requests. Not sure if that was your
intention, but if it was then I feel it was not motivated.

Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64