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 _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
