On 30 Jul 2013, at 12:04, Noah Silva wrote:
It causes the compiler to interpret the string constants in your
program
as UTF-8 rather than as unknown binary data, and hence convert them
at run
time to the current ansi code page when assigning them to an
ansistring/shortstring. This is unrelated to mode switches.
Ooh, this clears up a lot that the Wiki didn't explain very well!
You may want to adapt the wiki in that case. It is mostly written by
users for users. We only maintain a few pages on the wiki ourselves
(such as User_Changes_Trunk).
So basically saving the file with BOM tells the compiler/RTL to take
care
of things for you, and saving as UTF8 without BOM is appropriate if
you
will take care of any conversions yourself.
Yes.
If UTF8String is just an alias to ANSIString,
It is, in 2.6.x.
then I assume it also means
that right now the compiler would convert such constants to the local
encoding even when assigning to a UTF8String? (If so, this explains
why my
finally working console code works only with No BOM).
Indeed.
Also, I assume that the treatment of ResourceString and any other
constants
is the same?
Yes.
Jonas
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal