On Friday 11 October 2002 18:16, Shachar Shemesh wrote:
I've had a similar problem. X uses the current locale in order to convert the keycode into a character. Try setting you language type to Hungarian and then report. If you don't want to set the system locale, try the following command (under bash): LANG=hu wine ....... This will set the language for one application only.
It's not that easy :(
The problem is that XLookupString is used, which according to the Xlib documentation works only for Latin1 chars. It does _not_ takes locale settings into account. It is explicitly stated in the docs that XLookupString is for the cases when you dont need locale handling. If you want to handle locales you have to use the input method framework (described in a separate Xlib chapter). And I could not find a simple solution from those docs (tough this was the first case I have looked in the X's postscript documentation).
Nevertheless I have tried it with: LANG=hu wine WINWORD.EXE but the output is exactly the same.
So you can take it as I'm reporting it :)
Regards Zsolt
Rizsanyi Zsolt wrote:
On Wednesday 09 October 2002 14:25, Rizsanyi Zsolt wrote:
Hi!
When running MS Word 97 I get the next error messages when I try to write some of the Hungarian characters. So I'm reporting it as requested in the message :)
err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 01F5 (odoubleacute) : err:keyboard:X11DRV_ToUnicode (virtKey=DB,scanCode=1A,keycode=22,state=10) err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 01FB (udoubleacute) : err:keyboard:X11DRV_ToUnicode (virtKey=DC,scanCode=2B,keycode=33,state=10)
Is it trivial to fix, or there are some problems with it? I would like if that could work... I'm also willing to code it if that is needed :)
I have investigated it, and the problem is in this code (from dlls/x11drv/keyboard.c):
else TRACE("Found keycode %d (0x%2X)\n",e.keycode,e.keycode);
ret = XLookupString(&e, (LPVOID)lpChar, 2, &keysym, NULL); wine_tsx11_unlock();
if (ret == 0) · { · BYTE dead_char;
· dead_char = KEYBOARD_MapDeadKeysym(keysym); · if (dead_char) · { · MultiByteToWideChar(main_key_tab[kbd_layout].layout_cp, 0, &dead_char, 1, bufW, bufW_siz e); · ret = -1; · } · else · { · char· *ksname;
· ksname = TSXKeysymToString(keysym); · if (!ksname) · · ksname = "No Name"; · if ((keysym >> 8) != 0xff) · · { · · ERR("Please report: no char for keysym %04lX (%s) :\n", keysym, ksname); · · ERR("(virtKey=%X,scanCode=%X,keycode=%X,state=%X)\n", virtKey, scanCode, e.keycode, e.state); · · } · } · }
The problems come from that the XLookupString is used to convert the keycode to the display string. It does properly display that the pressed key is odoubleacute, but because XLookupString works only for Latin1 characters, so the string representation is not returned.
I dont see how this situation should be handled. Maybe another X function should be used instead of XLookupString (one which works with chars other than Latin1).
I'm not too good in X programming so please HELP!!
Thanks Zsolt