[fpc-devel] Unicode resourcestrings

Daniël Mantione daniel.mantione at freepascal.org
Sun Mar 2 19:32:01 CET 2008



Op Sun, 2 Mar 2008, schreef Martin Schreiber:

> On Sunday 02 March 2008 18.48:01 Daniël Mantione wrote:
>> Op Sun, 2 Mar 2008, schreef Florian Klaempfl:
>>>> What did I wrong?
>>>
>>> I'am not sure how this could be made working just a remark: -Fcutf8
>>> influences _only_ the interpretation of string constants when converting
>>> them to unicode.
>>
>> Right. Try to compile the (utf-8 encoded) file without specifying a code
>> page, this should result in the constants ending up in the resourcestring
>> without processing.
>>
> And now the widestring constants are broken, see attachment...

Ok, that was indeed to be expected.

Yes, I believe some compiler changes need to be made. Resourcestrings 
should have the encoding of the source files, if you encode your source 
file in utf-8, the resourcestrings will have to be encoded in utf-8.
No idea what processing currently occurs. The compiler will see the
string constants as widestring constants, then must do some conversion 
back to ansistring to get them into the resourcestring tables.

Daniël


More information about the fpc-devel mailing list