On Fri, 15 Apr 2016 10:19:06 +0200 Michael Schnell <mschn...@lumino.de> wrote:
> On 04/15/2016 08:35 AM, Michael Van Canneyt wrote: > > > > For string constants there are slightly different rules. There the > > result depends on the {$codepage} directive of the source file. > > Hmmm. > > If not setting $codepage Ifor a constant string I get StringCodePage = 0, > > If setting {$codepage UTF8} for a constant string I get StringCodePage = > 1200 which is UTF16. > > The program does work decently, anyway. > > And ASM stepping shows that no conversion is done. That's correct. String literals in a codepage other than system are stored as UTF-16 in the binary and converted on assign. The conversion happens at runtime, so the string codepage is decided at runtime. Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal