Subject Re: [firebird-support] Bug with character sets
Author Dimitry Sibiryakov
>> Consider this example: CHAR(4), containing some characters in UTF8
>> encoding. First character has size 1 byte, second - 2 bytes and the last
>> one is 4 bytes. RealLengthInBytes = 7, bytes_per_character = 4,
>> buffer_size = 16. Show me the way to calculate RealLengthInChars (which
>> is 3) from numbers above.
>
> Martijn meant "reallengthincodepoints", and that *can* be determined as
> (buffer size) / (max bytes per codepoint).

Ok, for the example above your "reallengthincodepoints" is 4. I
wouldn't call it "real" for something that have length 3 without padding
and 16 with it.

SY, SD.