[fpc-pascal] FPC 3 regression: cannot use TStringList for UTF-8 data any more?
mschnell at lumino.de
Wed Apr 13 10:15:29 CEST 2016
On 04/13/2016 09:04 AM, Michael Van Canneyt wrote:
> It uses the DefaultSystemcodepage. If the system codepage is UTF8, then
> it will use UTF8.
(Sorry for replying yet another answer to the same message of yours)
> On the other hand a *String* is assumed at compile time to have
> /DefaultSystemCodePage/ (CP_ACP). /DefaultSystemCodePage/ is defined
> at run time, so the compiler conservatively assumes that /String/ and
> /UTF8String/ have different encodings.
So I was wrong assuming from your message that DefaultSystemcodepage is
the default encoding for the type "String" (and with that for TStrings
and with that for TSringList).
Now I still don't know whether/how the default encoding for the type
"String (which I still assume is defined when building the compiler) is
depending on the arch/OS the compiler is built for. (I only tested on
Linux and here it rather obviously is UTF8. I assume on Windows it's
UTF16 for Delphi compatibility).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal