Subject | CHAR field padded with blanks to triple length (on read) |
---|---|
Author | laurenz_brein |
Post date | 2005-07-26T09:38:52Z |
I have a FireBird database, version 1.5.2.4731.
The database character set is UNICODE_FSS.
There is a table with a CHAR(50) column and another with a VARCHAR(50)
column.
I store strings of length 50 in both.
When I select the columns with a PreparedStatement, the String
returned for the VARCHAR(50) column is as expected, but the String
from the CHAR(50) column has length 150; it consists of the stored
value, padded with 100 blanks.
I guess that this is a bug; is it known?
What is the explanation? Is there a connection to the Unicode
character set?
Thank you,
Laurenz Albe
The database character set is UNICODE_FSS.
There is a table with a CHAR(50) column and another with a VARCHAR(50)
column.
I store strings of length 50 in both.
When I select the columns with a PreparedStatement, the String
returned for the VARCHAR(50) column is as expected, but the String
from the CHAR(50) column has length 150; it consists of the stored
value, padded with 100 blanks.
I guess that this is a bug; is it known?
What is the explanation? Is there a connection to the Unicode
character set?
Thank you,
Laurenz Albe