Subject | Re: [firebird-support] Bug with character sets |
---|---|
Author | Milan Babuskov |
Post date | 2009-05-19T13:00:03Z |
Martijn Tonies wrote:
explained to me on firebird-devel a few months ago. And it does work.
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.
Regards,
--
Milan Babuskov
http://www.flamerobin.org
http://www.guacosoft.com
> I'm not sure how much sense this makes to me :-)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 forThat's correct.
> characters is always "4 bytes" * "number of characters".
> But what happensYou don't truncate it to number of bytes, you truncate it to number of
> in your particular case if the character is 2 bytes long? You cannot
> truncate it to the first byte (to get ASCII 'Y')?
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.
Regards,
--
Milan Babuskov
http://www.flamerobin.org
http://www.guacosoft.com