[fpc-devel] Understanding literal strings

Florian Klaempfl florian at freepascal.org
Fri Dec 14 16:01:10 CET 2007


Florian Klaempfl schrieb:
> The BOM/code page directive simply allows (and nothing else!) you to
> create widestrings using simple string constants even if you want to use
> chinese or whatever characters. Just tell the compiler what enconding to
> use to convert the string constant to widestring.

Of course, this might go wrong if you assign such a string constant to
an ansistring because this is done at run time because it's obvious that
assigning a widestring (that's what you defined using chars>255) to an
ansistring must be done at run time because we know the encoding of the
ansistring only at runtime.



More information about the fpc-devel mailing list