[fpc-devel] Unicode support (yet again)

Michael Schnell mschnell at lumino.de
Thu Sep 15 10:16:54 CEST 2011


On 09/15/2011 09:57 AM, Graeme Geldenhuys wrote:
> What the  hell has "experience"  got to  do with the  preference between
> UTF-8  and UTF-16?
In fact users want to deal with "decently coded characters" and not with 
"cryptic bytes some of which together are representing a character". 
(e.g. when doing MyChar := MyString[1]; )

Here UTF-8 code in a type called "ANSISting" is a no-go.

UTF-16 code in WideChar, and WideString come quite close to this in the 
Western world, but I think this is not good enough.

Full 4 byte Unicode comes even  closer, but there still are some hard to 
handle double-DWord codes plus the memory usage is huge.

So Delphi NewStrings (cpstrnew) and a 32 Bit Char type seems like the 
most user-friendly way to go. (But of course eating a lot of performance.)

-Michael




More information about the fpc-devel mailing list