Subject Re: [firebird-support] Bug with character sets
Author Martijn Tonies
Hello Milan,

> Martijn Tonies wrote:
>> And what if one of the characters is multi-byte? You get something
>> like:
>>
>> ASCII 'A' - 1 byte
>> '<somechar>' - 2 bytes
>> ASCII 'C' - 1 byte
>> <8 spaces>
>
> Yes.

4 bytes, while 3 ASCII chars would take 3 bytes, 9 spaces.

>> And when decoding this to a string in the client app, the decode routine
>> recognizes multi-byte chars and decodes them accordingly?

And this decode routine decides how many bytes to use, it determines this
by the byte values, so the first byte value of the multi-byte character
signals
the decode routine that it is actually 2 bytes?

> Well, in FlameRobin we use wxString and wxCSConv classes that convert
> between various character sets and encodings. wxCSConv is able to take
> raw bytes and translate that to string of characters.
>
> I assume there is something similar in Delphi as well.

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