[kernel32][tests][locale] Add test for CompareStringA for non latin symbols

Dmitry Timoshkov dmitry at codeweavers.com
Thu Jan 25 08:07:38 CST 2007

"Anatoly Lyutin" <vostok at etersoft.ru> wrote:

>> I'd suggest to test specific strings instead of auto-generated tables.
>> Since microsoft apparently uses their own unicode tables that differ
>> from unicode.org ones that's almost impossible to get the exactly same
>> behaviour among Wine and Windows.
> Unfortunately there are programs which  are using this table of sorting 
> and  no other.

We can do nothing to fix the apps calling CompareStringA for binary data.
The only way would be to patch unicode.org tables manually, but it's not
acceptable as a general solution.

Anyway you need to test the specific cases, and not add a blanket (all in
one) case IMO.

>>> +   return CompareStringA(LOCALE_USER_DEFAULT,0,s1,1, s2,1) - 2;
>>> +}
>> You need to directly specify the locale id, otherwise the test won't pass
>> on a system with different user default locale (like the Alexandre's 
>> one).
> In:
> +
> +    while(Locales[j].pcTable)
> +    {
> +        if(setlocale(LC_ALL,Locales[j].pcLocalName)!=NULL)
> +        {
> +            for(i=0;i<cSize;i++)
> set another locale, isn't it?

This doesn't magically change Wine internal locale used by CompareStringA.


More information about the wine-devel mailing list