Subject | Re: [firebird-support] Bug with character sets |
---|---|
Author | Brad Pepers |
Post date | 2009-05-19T13:36:34Z |
On 19-May-09, at 3:52 AM, Dimitry Sibiryakov wrote:
in it a UTF character code taking 2 bytes and another taking 3. I
will then get back an 8 byte buffer with the first 5 bytes holding my
data and the last 3 with spaces? I have to work this all out on the
client side??? Basically it looks like I have to go through the data
UTF8 character at a time and once I get to the right length then I can
remove the trailing spaces. And every client is going to have to do
this and figure this out. Not very friendly of the API!
--
Brad
>> Could be me, but isn't the -database server- supposed to return thisSo what if I have a column defined as char(2) using UTF8 and I store
>> character data correctly? If there's a Y stored in UTF8 format, it
>> should
>> return a Y in UTF8 format. Why does it return 'Y<<<' (where < is
>> space)
>
> Server must fill 4-bytes buffer with something because UTF8 CHAR(1)
> size is 4 bytes. Space isn't the worst choice for filler character
> (perhaps, it is comply to standard).
in it a UTF character code taking 2 bytes and another taking 3. I
will then get back an 8 byte buffer with the first 5 bytes holding my
data and the last 3 with spaces? I have to work this all out on the
client side??? Basically it looks like I have to go through the data
UTF8 character at a time and once I get to the right length then I can
remove the trailing spaces. And every client is going to have to do
this and figure this out. Not very friendly of the API!
--
Brad