On 10/11/2011 11:05 AM, Marco van de Voort wrote:
In our previous episode, Michael Schnell said:
I suppose there is a way to just set the encoding of a new string. This
should not affect the stored bytes (or words or DWords).
Afaik it does, but only for ansistring.
What exactly is "ansistring" in this relation ? If there are multiple (names for the basic) dynamically typed ("new") string type(s). what advantage is this supposed to provide ?
IIRC there is also a codepage that
just means "system default" and assumes the system knows how to convert that
from/to utf16 (or utf8 on *nix)
I recon the "system default code page" is the encoding used when assigning a constant string to a string variable. It might/should be possible that same is different from the coding of the source file. It might/should be granted that a conversion is not necessary at run time, but the constant already is stored appropriately in the executable.

OTOH when "ANSI" is used for a constant it might/should or should not be possible that the current locale setting is used for doing a proper conversion at runtime.

-Michael
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to