On 2 January 2011 21:33, Sven Barth wrote: > > Yes, UnicodeString (and WideString as well) is treated as UTF16 encoded > string. > > The type name might come from Delphi compatibility (tada!).
And once again for someone as myself, not using Delphi, it is quite ridiculous too see the errors the Free Pascal project makes (or should that rather be the errors Delphi makes) in such cases/examples. Trying to fool all developers into thinking that "unicode" [as in UnicodeString type] only means UTF-16, because indecently that is what Microsoft uses in its Windows OS. Free Pascal is a cross-platform compiler but it seems Microsoft even dictates what Free Pascal must do. A shame really (and a slap in the face for any developer working on a non-Microsoft platform). UnicodeString should really mean any of the possible unicode encoding types. Maybe the code-page enabled string type (cpstrnew branch) will use some more "sane" name for its string type, or redefine the standard String type to mean a code page / encoding enabled string type instead of String = AnsiString. > And currently UTF8String is defined as AnsiString, so there is currently no > difference That's what I thought. So why did they [FPC team] actually bother to create the UTF8String type then? -- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
