Subject Re: [firebird-support] Bug with character sets
Author Kjell Rilbe
Brad Pepers wrote:
> I wonder why I don't see this problem at all with varchar columns
> though. If I change the char(1) to varchar(1), everything works
> properly and I don't seem to have to do any of this. Is this expected?

I assume with varchar, FB trims the buffer to the data size actually used?

> Also the problem seems to go away if I change the character set of my
> connection to ISO8859_1 even though the character set used for the
> database is still UTF8.

That's because with a ISO8859_1 connection FB transliterates the data to
that charset, which is fixed-width, 1 byte/char, and then the buffer
size = N byte for char(N). So, the "problem" is only there for
variable-length charsets.

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


[Non-text portions of this message have been removed]