Am 02.01.2011 20:33, schrieb Sven Barth: > On 02.01.2011 18:29, Graeme Geldenhuys wrote: >> On 2 January 2011 13:47, Sven Barth<[email protected]> wrote: >>> Casting from AnsiString to UnicodeString invokes the WideString >>> Manager's >>> Ansi2UnicodeMoveProc which converts the supplied AnsiString to a correct >>> UTF16 string. >> >> Does that mean FPC and LCL always treats UnicodeString type as a UTF16 >> encoded type? If so, that is a rather odd "type name" then, because >> "unicode" is NOT just UTF16, it is also UTF8, UTF16, UTF16-LE, >> UTF16-BE and UTF32. A better, and more correct, type name would then >> have been UTF16String, just like there is a UTF8String type (though I >> don't really know how the latter differs from AnsiString (which is >> basically an array of bytes). > > Yes, UnicodeString (and WideString as well) is treated as UTF16 encoded > string.
This is only a temp. solution (till at the end of the world, the cpstrnew branch is ready ;)). The encoding of an unicode string will be dependent on a variable. -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
