2011/9/20 Michael Schnell <mschn...@lumino.de>: > On 09/20/2011 01:09 PM, cobines wrote: >> >> String=AnsiString(CP_UTF8), > > Meaning that a library function (or an FPC syntax candy feature) can't > detect the code that is used for the string.
The code page will be stored in the record describing the string, you will be able to read it with something like StringCodePage(s). > AFAIK, automatic correct UTF-8 to UTF-16 conversion is not done by the > compiler when assigning an "String" to a "WideString". The string type the > compiler sees (after evaluation the type alias) is ANSIString, so maybe it > does an ANSI to UTF-16 conversion. With the code page aware strings it will be able to detect encoding and do UTF-8<->UTF-16 too. -- cobines -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus