string comparison functions

Dmitry Timoshkov dmitry at codeweavers.com
Sat Apr 7 09:51:12 CDT 2007


"Tomas Kuliavas" <tokul at users.sourceforge.net> wrote:

> What rules are used when Wine libraries compare Unicode strings? I need to
> know when ascii characters can match their approximate Unicode
> equivalents. For example: 'U+1D49 MODIFIER LETTER SMALL E' matches 'U+0065
> LATIN SMALL LETTER E' on Wine.

WideCharToMultiByte translates a unicode string to a multibyte encoding using
the specified code page, and then simple strcmp between the resulting string
and "e" will do what you need.

> I am debugging IE javascript security issues. IE6 on Wine (Linux Debian)
> matches more Unicode equivalents than IE6 on Win98 and WinXP. If you need
> more information, I can provide sample html that works on Wine and does
> not work on Win98/XP.
> 
> I am not C/C++ programmer. I only need to know which library provides
> mapping of unicode equivalents in string comparison functions. Is it
> standard C library? glibc 2.3.6 on Debian Etch.

Wine uses tables auto-generated from the data provided by unicode.org,
the files are in libs/wine directory. Since the data in Wine and Windows
is from different sources there are quite a bit of differences in translations
between unicode and code pages.

-- 
Dmitry.



More information about the wine-devel mailing list