On 04/14/2016 08:52 AM, Michael Van Canneyt wrote:
The default encoding for the string type is determined at run-time, not at compile time.

How can that work for string constants ? Will they in fact (virtually) change their encoding when DefaultSystemcodepage is different ?

For a test I did   result := StringCodePage('äü');

This results in a 0 which is CP_ACP, which is supposed to mean "in fact its the value of DefaultSystemcodepage", which in my test in Linux is 65001 which means UTF8.

Of course in this test it's correct. But if I start the executable in a system that imposes another value of DefaultSystemcodepage or if it is compiled in a way that results in the constant strings to be coded in another way than 65001, what will I see ? (Right now I don't have a Lazarus installation on Windows at hand).

-Michael
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to