[fpc-devel] Unicode support - for the 20th time... ;-)

Michael Schnell mschnell at lumino.de
Thu Nov 20 12:40:19 CET 2008


>
> type  cp850string=ansistring(CP_850);
>       utf8string=ansistring(CP_UTF8);
>
Why not use the current locale for this ? Would that be just ANSIString ?

>   a:=b;  {Compiler knows conversion to perform at compile time.
I suppose the conversion function is provided with the locale and this 
it as well could use the current one.
>
> I agree. However, FPC may still decide to do some things dynamic to 
> prevent a blowup of rtl size.
Maybe this really is an even better concept (when done in a way that it 
provides fast and small code for "embedded" projects).

If course it would be good to allow the user to write his code in a way 
that as little conversions as possible are necessary (e.g everywhere use 
the API coding of the OS he compiles for, or use especially fast UCS2 
WideStrings for analyzing, building his Unicode information.

-Michael



More information about the fpc-devel mailing list