On Fri, 15 Apr 2016 10:43:55 +0200 Michael Schnell <mschn...@lumino.de> wrote:
>[...] > Do you suggest that the codepage of the sourcecode is preserved by the > compiler when creating the string constant in object code ? It depends. There are two codepages. The real one and the one you tell the compiler. If you tell the compiler that the string literal is 8-bit system codepage, it will copy it without conversion to the binary. Otherwise it converts it to UTF-16. For instance using {$codepage utf8} tells the compiler to convert all your literals to UTF-16. Without the {$codepage} the compiler preserves the real codepage. > Seemingly StringCodePage does not work correctly with string constants > anyway: I found that setting {$codepage UTF8}, for a constant string I > get StringCodePage = 1200 which is UTF16. StringCodePage on a literal is pretty useless. You should use StringCodePage on variables. Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal