kernel32 nls file codepage conversion

Frédéric Delanoy frederic.delanoy at gmail.com
Sun May 30 11:05:51 CDT 2010


2010/5/30 Dmitry Timoshkov <dmitry at codeweavers.com>:
> Frédéric Delanoy <frederic.delanoy at gmail.com> wrote:
>
>> I'm intending to convert dlls/kernel32/nls/fr.nls from CP 1252 to CP
>> 65001 (UTF-8),
>
> Is there a ny reason behind that?

Uniformisation? Universality? All other rc files (at least Fr ones,
and most of the others) have already been
converted.

>> but I've some questions first:
>> - most nls files are non-UTF8... is it intended? or just "legacy"?
>
> nls files in Wine use Windows code page appropriate for the language
> in that file, which a resource compiler understands, and which can be
> corerctly converted to unicode.

So it can be in any code page, provided the #pragma codepage is set
accordingly I guess?

>> - can LOCALE_IDEFAULTANSICODEPAGE be set to 65001 or should it be left
>> at its current "1252" value, i.e. is it necessary for compatibility
>> with older win versions where UTF-8 is not the default (correct me if
>> I'm wrong)?
>
> Noone Windows version uses UTF-8 for locales. LOCALE_IDEFAULTANSICODEPAGE
> must be set to the ANSI code page used by Windows for that laguage (i.e.
> leave it alone).

OK. If I understand correctly, the codepage of the nls file is
orthogonal to that of LOCALE_IDEFAULTANSICODEPAGE?

>> - LOCALE_SCURRENCY is set to char code 80 (<80> in vim). What is that
>> exactly? The code for the euro sign in a specific  code page? which
>> one?
>
> The code page the file uses (1252 for fr.nls).

OK
> --
> Dmitry.

Thanks for your comments.

Frédéric



More information about the wine-devel mailing list