On Sun, Apr 15, 2012 at 12:35:08PM +0200, Mattias Gaertner wrote: > I'm not sure what you mean with "the Lazarus UTF8String". > > There is UTF8String = type AnsiString(CP_UTF8) defined in system.pp. > > Under Linux and OS X any LCL application gets > DefaultSystemCodePage:=CP_UTF8, so all strings without an encoding are > treated as CP_UTF8, which means encoded as UTF8String.
Under OSes that have UTF-8 as default 1 byte encoding, CP_ACP should behave as if it were UTF-8. The whole idea is that you mark the outside world with CP_ACP, and your own internal encoding UTF-8. (or unicodestring, the principle doesn't depend on that), and the RTL makes the conversion from ACP to UTF8 automatically. So manually setting CP_UTF8 as system encoding is a workaround, not a long term solution. -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus