Wine and locales

Filip Navara xnavara at
Mon Jul 29 17:52:03 CDT 2002

Shachar Shemesh wrote:

> Actually, how the different locales affect string comparisons is easy. 
> I'm not an expert, but think of it like that. In a locale that is 
> "plain", the various signs above vowels (such as "å" ) are past the 
> end of the ASCII table. In a French locale, on the other hand, they 
> would be right next to "a". Depending on your locale, therefor, 
> lstrcmpA(" å", "z") will return either positive or negative.

Well, I get the theory, but my mind just doesn't like thinking about it. 
;-) Thanks for explaining.

> What I don't get is - how can depending on the thread/user locale ever 
> fail?

Maybe I haven't expressed myself clearly. What I mean is that it does 
the comparsion of the strings first with the thread locale and if that 
returns negative result (string s not equal)  then it tries to compare 
the strings again using the system locale.


> Only if you have the order off the top of your head, and it is NOT the 
> one outlined in "find_entry" (dlls/ntdll/resource.c). I.e. - if you 
> think the one in find_entry is ok, don't waste your time on writing 
> test cases.

I think "find_entry" is almost correct. Only honouring the the default 
UI lanaguage is missing (as introduced in W2K). I think it belongs 
between step 3. and 4. and that the user default UI language 
(GetUserDefaultUILanguage) is tried first and system default UI language 
(GetSystemDefaultUILanguage) just after that.


More information about the wine-patches mailing list