Hi.
I tried repeating Hetz's experiment, and run the command "LANG=he_IL wine notepad", and then type a few (random) Hebrew chars. I get the following messages on screen:
Warning: Language 'he_IL' was not found, retrying without country name... fixme:edit:EDIT_EM_FmtLines soft break enabled, not implemented fixme:win:GetProcessDefaultLayout ( 0x40556df4 ): No BiDi err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 0CEA (hebrew_finalkaph) : err:keyboard:X11DRV_ToUnicode (virtKey=4C,scanCode=26,keycode=2E,state=2010) err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 0CF9 (hebrew_shin) : err:keyboard:X11DRV_ToUnicode (virtKey=41,scanCode=1E,keycode=26,state=2010) err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 0CEC (hebrew_lamed) : err:keyboard:X11DRV_ToUnicode (virtKey=4B,scanCode=25,keycode=2D,state=2010) err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 0CE3 (hebrew_dalet) : err:keyboard:X11DRV_ToUnicode (virtKey=53,scanCode=1F,keycode=27,state=2010)
I tried following X11DRV_ToUnicode around a bit, but hit a brick wall at the X11 function "TSXKeysymToString". Anyone has any idea why the Hebrew characters are not being translated correctly (the character names are correct).
Shachar
"Shachar Shemesh" wine-devel@sun.consumer.org.il wrote:
I tried repeating Hetz's experiment, and run the command "LANG=he_IL wine notepad", and then type a few (random) Hebrew chars. I get the following messages on screen:
Warning: Language 'he_IL' was not found, retrying without country name...
Probably LOCVAL(LOCALE_SISO3166CTRYNAME,"HE") in dlls/kernel/nls/heb.nls is wrong and "HE" should be replaced by "IL" (at least Windows 2000 reports "IL"). Windows2000 also reports LOCALE_SISO639LANGNAME = "iw". It would be a good idea to revise all fields in that file.
fixme:edit:EDIT_EM_FmtLines soft break enabled, not implemented fixme:win:GetProcessDefaultLayout ( 0x40556df4 ): No BiDi err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 0CEA (hebrew_finalkaph) : err:keyboard:X11DRV_ToUnicode (virtKey=4C,scanCode=26,keycode=2E,state=2010) err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 0CF9 (hebrew_shin) : err:keyboard:X11DRV_ToUnicode (virtKey=41,scanCode=1E,keycode=26,state=2010) err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 0CEC (hebrew_lamed) : err:keyboard:X11DRV_ToUnicode (virtKey=4B,scanCode=25,keycode=2D,state=2010) err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 0CE3 (hebrew_dalet) : err:keyboard:X11DRV_ToUnicode (virtKey=53,scanCode=1F,keycode=27,state=2010)
I tried following X11DRV_ToUnicode around a bit, but hit a brick wall at the X11 function "TSXKeysymToString". Anyone has any idea why the Hebrew characters are not being translated correctly (the character names are correct).
First of all: are hebrew keyboard input works in a native X11 text editor? What reports xev? (And it would be a good idea to add setlocale(LC_CTYPE,""); at the very first lines of xev.c, recompile it, and check whether it still works).
Dmitry Timoshkov wrote:
"Shachar Shemesh" wine-devel@sun.consumer.org.il wrote:
I tried repeating Hetz's experiment, and run the command "LANG=he_IL wine notepad", and then type a few (random) Hebrew chars. I get the following messages on screen:
Warning: Language 'he_IL' was not found, retrying without country name...
Probably LOCVAL(LOCALE_SISO3166CTRYNAME,"HE") in dlls/kernel/nls/heb.nls is wrong and "HE" should be replaced by "IL" (at least Windows 2000 reports "IL"). Windows2000 also reports LOCALE_SISO639LANGNAME = "iw". It would be a good idea to revise all fields in that file.
I'll have a look, but I don't think its related to the problem I reported here. In any case, I changed "HE" to "IL", and the warning message disappeared, but the rest of the messages remained the same. I suspect it doesn't matter one way or the other, as the match would have still been made with the language name, and chosen the right locale.
fixme:edit:EDIT_EM_FmtLines soft break enabled, not implemented fixme:win:GetProcessDefaultLayout ( 0x40556df4 ): No BiDi err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 0CEA (hebrew_finalkaph) : err:keyboard:X11DRV_ToUnicode (virtKey=4C,scanCode=26,keycode=2E,state=2010) err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 0CF9 (hebrew_shin) : err:keyboard:X11DRV_ToUnicode (virtKey=41,scanCode=1E,keycode=26,state=2010) err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 0CEC (hebrew_lamed) : err:keyboard:X11DRV_ToUnicode (virtKey=4B,scanCode=25,keycode=2D,state=2010) err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 0CE3 (hebrew_dalet) : err:keyboard:X11DRV_ToUnicode (virtKey=53,scanCode=1F,keycode=27,state=2010)
This is of particular strangness, as E3 *is* the right character for hebrew_dalet, and all I could see that the missing function SHOULD do is do this translation.
I tried following X11DRV_ToUnicode around a bit, but hit a brick wall at the X11 function "TSXKeysymToString". Anyone has any idea why the Hebrew characters are not being translated correctly (the character names are correct).
First of all: are hebrew keyboard input works in a native X11 text editor?
Yes. Mozilla, kedit, using the same keymap, issue Hebrew characters just fine.
What reports xev? (And it would be a good idea to add setlocale(LC_CTYPE,""); at the very first lines of xev.c, recompile it, and check whether it still works).
I did not setlocale as you suggested, but I did not set LANG= anything when running it either. My environment did not contain any LANG or LC settings at all.
KeyPress event, serial 30, synthetic NO, window 0x2200001, root 0x31, subw 0x0, time 1260238500, (89,131), root:(681,151), state 0x2010, keycode 38 (keysym 0xcf9, hebrew_shin), same_screen YES, XLookupString gives 0 characters: ""
KeyRelease event, serial 30, synthetic NO, window 0x2200001, root 0x31, subw 0x0, time 1260238535, (89,131), root:(681,151), state 0x2010, keycode 38 (keysym 0xcf9, hebrew_shin), same_screen YES, XLookupString gives 0 characters: ""
I don't know how to read xev's output, so I do not know what to look for (nor do I know what it is that TSXKeysymToString is supposed to do, or what configuration file it depends on).
Trying to look the function up only returned "XKeysymToString". According to it, "hebrew_shin" should be translated according to X11/keysymdef.h, which has the following line: #define XK_hebrew_shin 0xcf9
In other words - there is every indication that this should have worked. Unless, of course, I have mislabled "TSXKeysymToString" as "XKeysymToString", which, quite frankly, is highly probable due to the use it gets.
Shachar
"Shachar Shemesh" wine-devel@sun.consumer.org.il wrote:
Probably LOCVAL(LOCALE_SISO3166CTRYNAME,"HE") in dlls/kernel/nls/heb.nls is wrong and "HE" should be replaced by "IL" (at least Windows 2000 reports "IL"). Windows2000 also reports LOCALE_SISO639LANGNAME = "iw". It would be a good idea to revise all fields in that file.
I'll have a look, but I don't think its related to the problem I reported here. In any case, I changed "HE" to "IL", and the warning message disappeared, but the rest of the messages remained the same. I suspect it doesn't matter one way or the other, as the match would have still been made with the language name, and chosen the right locale.
Right.
[skipped]
What reports xev? (And it would be a good idea to add setlocale(LC_CTYPE,""); at the very first lines of xev.c, recompile it, and check whether it still works).
I did not setlocale as you suggested, but I did not set LANG= anything when running it either. My environment did not contain any LANG or LC settings at all.
KeyPress event, serial 30, synthetic NO, window 0x2200001, root 0x31, subw 0x0, time 1260238500, (89,131), root:(681,151), state 0x2010, keycode 38 (keysym 0xcf9, hebrew_shin), same_screen YES, XLookupString gives 0 characters: ""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Yes, it has the same problem as Wine. XLookupString just returns 0 characters.
Could you please try to compile and run attached program and report whether using XmbLookupString makes things work better? If it doesn't, please post its output here.
Thanks.
Dmitry Timoshkov wrote:
What reports xev? (And it would be a good idea to add setlocale(LC_CTYPE,""); at the very first lines of xev.c, recompile it, and check whether it still works).
I did not setlocale as you suggested, but I did not set LANG= anything when running it either. My environment did not contain any LANG or LC settings at all.
KeyPress event, serial 30, synthetic NO, window 0x2200001, root 0x31, subw 0x0, time 1260238500, (89,131), root:(681,151), state 0x2010, keycode 38 (keysym 0xcf9, hebrew_shin), same_screen YES, XLookupString gives 0 characters: ""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Yes, it has the same problem as Wine. XLookupString just returns 0 characters.
Could you please try to compile and run attached program and report whether using XmbLookupString makes things work better? If it doesn't, please post its output here.
Thanks.
I did, but I have only a vauge idea what it was doing (my X programming knowledge is soso. I actually had to research my system for a few minutes before I found out the command line that was required in order to compile the program).
Output is attached. I sent it to one windows (the one activated by default when the program starts), and then activated the second one and typing again. As can be guessed, no go.
I typed a Hebrew word, followed by a english one (you can also see the keys used to tell kxdb to switch keyboard layouts). I am guessing that X needs some global config to make Hebrew work, but I don't know what or where it is. Maybe I need to set LC_CTYPE before running the X server?
Shachar
Current locale: C XLocaleOfIM: C Window 1 = 2000001 Window 2 = 2000003 FocusIn for 2000001 FocusIn for 2000003
KeyRelease event, serial 19, synthetic No, window 0x2000003,
KeyPress event, serial 19, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322861660, (-33,215), root:(1043,973), state 0x2010, keycode 38 (keysym 0xcf9, hebrew_shin), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" :
KeyRelease event, serial 25, synthetic No, window 0x2000003,
KeyPress event, serial 25, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322861780, (-33,215), root:(1043,973), state 0x2010, keycode 45 (keysym 0xcec, hebrew_lamed), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" :
KeyRelease event, serial 25, synthetic No, window 0x2000003,
KeyPress event, serial 25, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322862015, (-33,215), root:(1043,973), state 0x2010, keycode 30 (keysym 0xce5, hebrew_waw), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" :
KeyRelease event, serial 25, synthetic No, window 0x2000003,
KeyPress event, serial 25, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322862582, (-33,215), root:(1043,973), state 0x2010, keycode 32 (keysym 0xced, hebrew_finalmem), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" :
KeyRelease event, serial 25, synthetic No, window 0x2000003,
KeyPress event, serial 25, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322863633, (-33,215), root:(1043,973), state 0x2010, keycode 37 (keysym 0xffe3, Control_L), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" :
KeyPress event, serial 25, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322863640, (-33,215), root:(1043,973), state 0x2014, keycode 64 (keysym 0xffe9, Alt_L), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" : FocusIn for 2000003 Unknown event type 34
KeyRelease event, serial 25, synthetic No, window 0x2000003,
KeyRelease event, serial 25, synthetic No, window 0x2000003,
KeyRelease event, serial 25, synthetic No, window 0x2000003,
KeyPress event, serial 25, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322865111, (-33,215), root:(1043,973), state 0x10, keycode 43 (keysym 0x68, h), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 1 characters: "h" : 68
KeyRelease event, serial 27, synthetic No, window 0x2000003,
KeyPress event, serial 27, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322865352, (-33,215), root:(1043,973), state 0x10, keycode 26 (keysym 0x65, e), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 1 characters: "e" : 65
KeyRelease event, serial 28, synthetic No, window 0x2000003,
KeyPress event, serial 28, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322865748, (-33,215), root:(1043,973), state 0x10, keycode 46 (keysym 0x6c, l), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 1 characters: "l" : 6c
KeyRelease event, serial 29, synthetic No, window 0x2000003,
KeyPress event, serial 29, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322865918, (-33,215), root:(1043,973), state 0x10, keycode 46 (keysym 0x6c, l), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 1 characters: "l" : 6c
KeyRelease event, serial 30, synthetic No, window 0x2000003,
KeyPress event, serial 30, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322866171, (-33,215), root:(1043,973), state 0x10, keycode 32 (keysym 0x6f, o), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 1 characters: "o" : 6f
KeyRelease event, serial 31, synthetic No, window 0x2000003,
KeyPress event, serial 31, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322867019, (-33,215), root:(1043,973), state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" :
KeyPress event, serial 31, synthetic No, window 0x2000003, Current XNFocusWindow = 2000003 root 0x31, subw 0x0, time 1322867024, (-33,215), root:(1043,973), state 0x14, keycode 64 (keysym 0xffe9, Alt_L), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" : FocusIn for 2000003 Unknown event type 34
KeyRelease event, serial 31, synthetic No, window 0x2000003,
KeyRelease event, serial 31, synthetic No, window 0x2000003,
KeyRelease event, serial 31, synthetic No, window 0x2000003, FocusIn for 2000001
KeyPress event, serial 31, synthetic No, window 0x2000001, Current XNFocusWindow = 2000001 root 0x31, subw 0x0, time 1322870777, (484,-95), root:(488,663), state 0x2010, keycode 38 (keysym 0xcf9, hebrew_shin), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" :
KeyRelease event, serial 32, synthetic No, window 0x2000001,
KeyPress event, serial 32, synthetic No, window 0x2000001, Current XNFocusWindow = 2000001 root 0x31, subw 0x0, time 1322870949, (484,-95), root:(488,663), state 0x2010, keycode 45 (keysym 0xcec, hebrew_lamed), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" :
KeyRelease event, serial 32, synthetic No, window 0x2000001,
KeyPress event, serial 32, synthetic No, window 0x2000001, Current XNFocusWindow = 2000001 root 0x31, subw 0x0, time 1322871149, (484,-95), root:(488,663), state 0x2010, keycode 30 (keysym 0xce5, hebrew_waw), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" :
KeyRelease event, serial 32, synthetic No, window 0x2000001,
KeyPress event, serial 32, synthetic No, window 0x2000001, Current XNFocusWindow = 2000001 root 0x31, subw 0x0, time 1322871402, (484,-95), root:(488,663), state 0x2010, keycode 32 (keysym 0xced, hebrew_finalmem), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" :
KeyRelease event, serial 32, synthetic No, window 0x2000001,
KeyPress event, serial 32, synthetic No, window 0x2000001, Current XNFocusWindow = 2000001 root 0x31, subw 0x0, time 1322872827, (484,-95), root:(488,663), state 0x2010, keycode 64 (keysym 0xffe9, Alt_L), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" :
KeyPress event, serial 32, synthetic No, window 0x2000001, Current XNFocusWindow = 2000001 root 0x31, subw 0x0, time 1322872835, (484,-95), root:(488,663), state 0x2018, keycode 37 (keysym 0xffe3, Control_L), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 0 characters: "" : FocusIn for 2000001 Unknown event type 34
KeyRelease event, serial 32, synthetic No, window 0x2000001,
KeyRelease event, serial 32, synthetic No, window 0x2000001,
KeyRelease event, serial 32, synthetic No, window 0x2000001,
KeyPress event, serial 32, synthetic No, window 0x2000001, Current XNFocusWindow = 2000001 root 0x31, subw 0x0, time 1322875277, (484,-95), root:(488,663), state 0x10, keycode 43 (keysym 0x68, h), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 1 characters: "h" : 68
KeyRelease event, serial 34, synthetic No, window 0x2000001,
KeyPress event, serial 34, synthetic No, window 0x2000001, Current XNFocusWindow = 2000001 root 0x31, subw 0x0, time 1322875481, (484,-95), root:(488,663), state 0x10, keycode 26 (keysym 0x65, e), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 1 characters: "e" : 65
KeyRelease event, serial 35, synthetic No, window 0x2000001,
KeyPress event, serial 35, synthetic No, window 0x2000001, Current XNFocusWindow = 2000001 root 0x31, subw 0x0, time 1322875782, (484,-95), root:(488,663), state 0x10, keycode 46 (keysym 0x6c, l), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 1 characters: "l" : 6c
KeyRelease event, serial 36, synthetic No, window 0x2000001,
KeyPress event, serial 36, synthetic No, window 0x2000001, Current XNFocusWindow = 2000001 root 0x31, subw 0x0, time 1322875958, (484,-95), root:(488,663), state 0x10, keycode 46 (keysym 0x6c, l), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 1 characters: "l" : 6c
KeyRelease event, serial 37, synthetic No, window 0x2000001,
KeyPress event, serial 37, synthetic No, window 0x2000001, Current XNFocusWindow = 2000001 root 0x31, subw 0x0, time 1322876125, (484,-95), root:(488,663), state 0x10, keycode 32 (keysym 0x6f, o), same_screen Yes, XFilterEvent returns: False XmbLookupString gives 1 characters: "o" : 6f
KeyRelease event, serial 38, synthetic No, window 0x2000001,
"Shachar Shemesh" wine-devel@sun.consumer.org.il wrote:
I typed a Hebrew word, followed by a english one (you can also see the keys used to tell kxdb to switch keyboard layouts). I am guessing that X needs some global config to make Hebrew work, but I don't know what or where it is. Maybe I need to set LC_CTYPE before running the X server?
Current locale: C XLocaleOfIM: C
Here is an answer (two lines above).
I have no a slightest idea how Mozilla and Kedit manage to work. It seems they use some library which does all hard work for them. But as you can see XFree86 APIs use "C" locale for Input Method and apparently for keyboard translation too. C run-time uses "C" locale as well, therefore all tools which use only standard C library APIs (sorting, string comparing, etc.) will not work correctly for you either.
And yes, could you please try to set LC_CTYPE and LANG to something sensible, perhaps 'he_IL', or 'he_HE', or 'iw_IL', or 'iw_HE'? I don't know what value will work in your envirinment, sorry. You should experiment a bit.
By the way, what distribution are you using? Glibc? XFree86 (mentioned 4.2.0)?
Ok, I found the problem with the kind help of the Ivrix mailing list guys.
The problem was that the locales were not installed (none of them). I installed the locales and presto - everything started to work. Thanks for everyone here for helping out.
Shachar
Dmitry Timoshkov wrote:
"Shachar Shemesh" wine-devel@sun.consumer.org.il wrote:
I typed a Hebrew word, followed by a english one (you can also see the keys used to tell kxdb to switch keyboard layouts). I am guessing that X needs some global config to make Hebrew work, but I don't know what or where it is. Maybe I need to set LC_CTYPE before running the X server?
Current locale: C XLocaleOfIM: C
Here is an answer (two lines above).
I have no a slightest idea how Mozilla and Kedit manage to work. It seems they use some library which does all hard work for them. But as you can see XFree86 APIs use "C" locale for Input Method and apparently for keyboard translation too. C run-time uses "C" locale as well, therefore all tools which use only standard C library APIs (sorting, string comparing, etc.) will not work correctly for you either.
And yes, could you please try to set LC_CTYPE and LANG to something sensible, perhaps 'he_IL', or 'he_HE', or 'iw_IL', or 'iw_HE'? I don't know what value will work in your envirinment, sorry. You should experiment a bit.
By the way, what distribution are you using? Glibc? XFree86 (mentioned 4.2.0)?
"Shachar Shemesh" wine-devel@sun.consumer.org.il wrote:
Ok, I found the problem with the kind help of the Ivrix mailing list guys.
The problem was that the locales were not installed (none of them). I installed the locales and presto - everything started to work. Thanks for everyone here for helping out.
Shachar, could you please provide an URL or the whole description of the steps required to correctly setup Hebrew locale support in Linux (for archival purposes)?
Thanks in advance.
Dmitry Timoshkov wrote:
"Shachar Shemesh" wine-devel@sun.consumer.org.il wrote:
Ok, I found the problem with the kind help of the Ivrix mailing list guys.
The problem was that the locales were not installed (none of them). I installed the locales and presto - everything started to work. Thanks for everyone here for helping out.
Shachar, could you please provide an URL or the whole description of the steps required to correctly setup Hebrew locale support in Linux (for archival purposes)?
Thanks in advance.
http://ivrix.org.il/mailing-lists/ivrix-discuss/2002/06/
All I had to do (I am using Debian) is 'apt-get install locales', and selecting the he_IL locale (not necessarily as default). Other distros will likely have somewhat different instructions.
Shachar