Subject | Re: [firebird-support] Bug with character sets |
---|---|
Author | Martijn Tonies |
Post date | 2009-05-19T13:07:01Z |
Hello Milan,
a value of 'NO'?
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
>> I'm not sure how much sense this makes to me :-)Then what would be the raw byte buffer for a CHAR(2), UTF8, with
>
> I did not like it myself when I learned about it, but this is how it was
> explained to me on firebird-devel a few months ago. And it does work.
>
>> UTF8 has 1, 2, 3 or 4 bytes per character, right? So the buffer for
>> characters is always "4 bytes" * "number of characters".
>
> That's correct.
>
>> But what happens
>> in your particular case if the character is 2 bytes long? You cannot
>> truncate it to the first byte (to get ASCII 'Y')?
>
> You don't truncate it to number of bytes, you truncate it to number of
> characters. It should be done using some function of your "string class"
> (ex. wxString in FlameRobin) after you convert the string from UTF8 to
> the character set used by user's desktop environment.
a value of 'NO'?
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