Subject | Re: [firebird-support] Bug with character sets |
---|---|
Author | Martijn Tonies |
Post date | 2009-05-19T12:18:30Z |
Hello Kjell,
char", so only 1 char.
But my question hasn't been answered:
How is this buffer filled and how do you know what bytes are significant
and what bytes aren't?
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com
>>> But how does the -client- know what bytes are significant and whatWe've had a 1-char example, Milan explained "4 bytes / 4 bytes per
>>> bytes aren't?
>>
>> You are right - client has no idea about length of data in
>> characters, that's why it just fill whole buffer with spaces.
>
> Client has to determine number of characters by dividing buffer size
> with "max bytes per character". For char(2) data in utf8, buffer size
> will be 8 byte, and max bytes per character is 4, so the data should eb
> trimmed to 2 characters (codepoints).
>
> That's what Milan said.
char", so only 1 char.
But my question hasn't been answered:
How is this buffer filled and how do you know what bytes are significant
and what bytes aren't?
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com