[fpc-devel] assign constant text to widestring

Daniël Mantione daniel.mantione at freepascal.org
Thu Oct 23 13:09:06 CEST 2008

Op Thu, 23 Oct 2008, schreef Michael Schnell:

>> The compiler definitively eats no ucs-2 encoded sources.
> I did check several times: My source file looks like this when I open it with 
> Ultra-Edit and tell to show it in Hex:
> FF FE 75 00 6E 0069 00 74 00 20 00 55 00 6E 00 ..u.n.i.t. .U.n.
> Now I created a Delphi program and read the file with TFileStream.
> Now I found a utf-8 coded information without a BOM.
> So Windows seems to play some nasty tricks on us. Supposedly FPC reads the 
> file in a similar way as TFileStream and thus the compiler in fact sees utf8.

The compiler uses blockread and performs no such conversions.


More information about the fpc-devel mailing list