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) http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus says:
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).
-Michael
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal