On 11 Nov 2008, at 15:26, Vincent Snijders wrote:
Jonas Maebe schreef:
It seems much more advisable to me to save the file with an UTF-8
BOM, or even better to add {$encoding utf-8} (and/or to pass -
Fcutf-8 to the compiler) and then just use
Edit1.Caption := UTF8Encode('hallo äöü');
As an extra bonus of not adding the UTF-8 BOM, you don't have to use
conversions to assign the UTF8 string in the source, translated by
the compiler to a UTF16 string, to an UTF8 encoded ansistring. It
saves a conversion at compile time and a conversion at run time.
And breaks all widestring usage.
Is there an explicit way to tell the compile not to convert
widestring string constants, even if the file contains an UTF-8 BOM?
No.
Jonas_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel