kernel32 nls file codepage conversion

Michael Stefaniuc mstefani at
Sun May 30 12:54:13 CDT 2010

On 05/30/2010 06:05 PM, Frédéric Delanoy wrote:
> 2010/5/30 Dmitry Timoshkov<dmitry at>:
>> Frédéric Delanoy<frederic.delanoy at>  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.
Yeah, go ahead. There are already a few nls file in UTF-8. It would be 
good to have only one codepage used throughout the Wine code and UTF-8 
is the way to go. Alexandre isn't opposed to this but the translators 
have to do/request it.

>>> 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?
Well, all the codepages that provide the needed characters ;)

>>> - 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
Yeah, most editors and afair file too misinterpret CP1252 as ISO-8859-1; 
they are very similar but not the same. Using UTF-8 "fixes" this.


More information about the wine-devel mailing list