[fpc-devel] Unicode and UTF8String

Florian Klaempfl florian at freepascal.org
Tue Dec 2 10:58:37 CET 2008

Michael Schnell schrieb:
>> The point is: if everybody takes care of the fact that ansistrings can
>> be multibyte, having utf-8 in ansistrings (if it's the locale encoding),
>> is no big deal at all.
> I do understand. But (in a real world) do you know anybody who does.
> If it would be "appropriate"  for ANSI code handling to take care of
> Multi-byte encoding we would not need locale-based code tables and en
> effect Unicode would not have been invented.

Multibyte ansi chars are still not unique and require the code page for
proper interpretation, this is why Unicode has been invented. By using
properly functions like ChartoByteIndex or NextCharIndex, it makes very
likely no difference for string processing code if the strings are multi
byte ansi or utf-8 unicode.

More information about the fpc-devel mailing list