No no, a string with unicode characters is interpreted by the compiler
as widestring constant, never as UTF-8 ansistring constant. If it does
otherwise, the compiler probably does not interpret your source code
as Unicode.
The issue might be the UCS-2 encoding of your source, perhaps try to
feed the compiler UTF-8, I didn't even know the compiler accepts
UCS-2, it may not work correctly.
Maybe you pinpointed the cause of the constant assigning issue I see
here. There is no selectable option in Lazarus to use UCS-2 coded source
files, it seems to be set to utf-8 on default and I never changed it.
Nonetheless my source file is stored as clean UTF-2 including correct
BOM. So maybe the compiler is fooled by Lazarus in some way.
But even if this in fact is a Lazarus- and not an FPC- problem, not
decently converting UTF8String <-> WideString seems an essential issue,
nonetheless, even if this problem in many cases is triggered by the LCL
using UTF-8 for everything.
-Michael
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel