[Bug 9583] CompareStringW gives incorrect result for some wide strings

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Sep 11 06:52:44 CDT 2014


https://bugs.winehq.org/show_bug.cgi?id=9583

--- Comment #23 from Virgo Pärna <virgo at gaiasoft.ee> ---
This is starting to get quite complex.
If I understand correctly, then compare_unicode_weights is supposed to give
same result for A and Ä. But then compare_diacritic_weights should show the
difference. 
Just for testing I extracted relavent parts from wine and I made a test program
to see, what happens. And it seems that those lines:
        ce1 = collation_table[collation_table[*str1 >> 8] + (*str1 & 0xff)];
        ce2 = collation_table[collation_table[*str2 >> 8] + (*str2 & 0xff)];
give the same result for A and Ä.
And that part is exactly same in compare_unicode_weights and
compare_diacritic_weights and compare_case_weights. So that would always give
same results AFAIU.
And I really don't understand, what part of the
http://www.unicode.org/reports/tr10/allkeys.txt collation.c contains.
>From the allkeys.txt
0041  ; [.0A15.0020.0008.0041] # LATIN CAPITAL LETTER A
00C1  ; [.0A15.0020.0008.0041][.0000.0032.0002.0301] # LATIN CAPITAL LETTER A
WITH ACUTE; QQCM

How does this information translate to collation_table? My perl is
unfortunately even worse than my C. But as far as I understand the array is
generated in make_unicode script.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list