[fpc-devel] Re: Unicode support (again)

Michael Schnell mschnell at lumino.de
Tue Nov 11 10:35:10 CET 2008


> Yes. In D2009 String is UTF16String and Char is WideChar, sizeof(Char)=2.
> I personally do not like this solution.
>   
Same here,

IMHO FPC could do this in and "Delphi 20089 string compatibility" mode. 
But  it should be configurable to use other ways (e.g. (a) String = 
WideString but have it counted in characters ("code points") and offer 
additional functions for speedy subcode ("code units") counting behavior 
or (b) String = UTF8String, counted in characters ("code points") and 
offer additional functions for speedy subcode ("code units") counting 
behavior), or (c) String = ANSIString old school behavior, or (d) String 
= UCS2 coded WideString.

In any case IMHO the compiler should know the difference between the 
types UTF8String and locale-depending ANSIString (and maybe between the 
WideString types UTF16String and UCS2String), so that conversion can be 
done automatically.


-Michael



More information about the fpc-devel mailing list