http://bugs.winehq.org/show_bug.cgi?id=8683
--- Comment #21 from Dmitry Timoshkov dmitry@codeweavers.com 2008-01-21 21:59:51 --- (In reply to comment #20)
added a trace and saw that for the ß key the call to XLookupString inside X11DRV_MapVirtualKeyEx seems to be generating bad results. When called inside X11DRV_KeyEvent and inside X11DRV_ToUnicodeEx: keysym=DF (ssharp), # of chars=2 / "\xc3\x9f"
ret = MultiByteToWideChar(CP_UTF8, 0, "\xc3\x9f", 2, buf, 10); ret = 1, buf[0] = 00df
When called inside X11DRV_MapVirtualKeyEx to map the same keycode: keysym=1001E9E, # of chars=3 / "\xe1\xba\x9e"
keysym 1001E9E is an X11 direct unicode mapping of 0x1E9E
ret = MultiByteToWideChar(CP_UTF8, 0, "\xe1\xba\x9e", 3, buf, 10); ret = 1, buf[0] = 1e9e
So, both return a properly encoded UTF-8 string but with different unicode characters.