Wine and cyrillic input and output ?

Dmitry Timoshkov dmitry at sloboda.ru
Mon Sep 10 21:34:01 CDT 2001


"Nikita V. Youshchenko" <yoush at cs.msu.su> wrote:

> > What version of xserver/fontsever are you using? I'm not using an external
> > fontserver, but built-in into XFree86 instead.
>
> I use XFree 4.1 and external xfs (because my workstation also acts as a
> truetype font server for several suns - and if xfs is already running, it
> is a waste of memory not to use it).
> But it really doesn't matter. From application point of view, the source of
> font can't be determined.

Sure.

> Attached to this message, there is the output of wine -debugmsg +font
> notepad.exe
> It shows that iso8859-1 fonts are opened ...  this may be the reason of
> the problem: iso8859 fonts have no cyrillic chars.

Probably. Did you try move font path with cyrillic fonts at the front of others,
or even (more radically) remove all non-cyrillic fonts from font path at all?

> >> Also, I can't get any russian input (how to swithc keyboard to russian? I
> >> use xkb configuration with "menu" switch key - it doesn't work for wine).
> >
> > I'm using fairly old KDE 1.1.2 with KiKbd.
>
> Does that mean that you use hacked way, when koi8-r codes are returned in
> XEvents? As far as I know, this way is wrong. The correct way is to return
> Cyrillic_* keysyms in XEvents, and setup cyrillic locale. This is required
> for modern software (such as anything based on Qt2) to work.

No, I have Cyrillic_* keysyms in the generated X events.

> There is a
> well-known article by Ivan Pascal that explains why.

I had a very detailed discussion with Ivan regarding handling keyboard events
in Wine. I'm basing my suggestions on that discussion.

> Anyway, while running -debugmsg +key,+keyboard the following is printed if
> I try to input cyrillic A:
>
> trace:key:X11DRV_KEYBOARD_HandleEvent state = 2001
> trace:key:X11DRV_KEYBOARD_HandleEvent KeyPress : keysym=6E1 (Cyrillic_A),
> ascii
> chars=1 / E1 / 'А'
> trace:key:X11DRV_KEYBOARD_HandleEvent keycode 0x29 converted to vkey 0x46
> trace:key:X11DRV_KEYBOARD_HandleEvent bScan = 0x21.
> trace:key:queue_kbd_event  wParam=0046, lParam=00210001, InputKeyState=80
> trace:key:TranslateMessage (WM_KEYDOWN, 0046, 00210001)
> trace:key:TranslateMessage Translating key VK_F (0046), scancode 21
> trace:key:X11DRV_ToUnicode (0046, 0021) : faked state = 1
> trace:keyboard:X11DRV_ToUnicode Found keycode 41 (0x29)
> trace:key:X11DRV_ToUnicode Translating char 0x46 from code page 20866 to
> unicodetrace:key:X11DRV_ToUnicode ToUnicode about to return 1 with char 46
> trace:key:TranslateMessage 1 -> PostMessage(WM_CHAR)
> trace:key:TranslateMessage (WM_CHAR, 0046, 00210001)
> trace:key:X11DRV_KEYBOARD_HandleEvent state = 2001
> trace:key:X11DRV_KEYBOARD_HandleEvent KeyRelease : keysym=6E1 (Cyrillic_A),
> ascii chars=1 / E1 / 'А'
> trace:key:X11DRV_KEYBOARD_HandleEvent keycode 0x29 converted to vkey 0x46
> trace:key:X11DRV_KEYBOARD_HandleEvent bScan = 0x21.
> trace:key:queue_kbd_event  wParam=0046, lParam=c0210001, InputKeyState=0
> trace:key:TranslateMessage (WM_KEYUP, 0046, C0210001)
>
> And english F is inputed instead of russian A.

Something is broken here. Could you please send me by e-mail (dmitry at baikal.ru)
maximally detailed description of your current X keyboard setup. I'll try to reproduce
the problem.

> > 1. Run charmap.exe with wine and try to figure out which font faces Wine
> > uses. It's my primary tool for checking Wine and fonts.
>
> There are plenty of fonts, and many of them have russian characters.

Then that means, that due to some reason, wrong fonts are used by Wine.
As already sayed, try to reduce number of fonts or change path order in
the fontpath.

> >> Maybe something wtong is in registry created by winesetup?
> >
> > Very unlikely.
>
> I thought about it because created ~/.wine/system.reg contained the
> following lines:
> [System\\CurrentControlSet\\Control\\Nls\\Codepage] 970847224
> "ACP"="1252"
> "OEMCP"="437"
> I replaced those with
> "ACP"="1251"
> "OEMCP"="866"
> But seems that nothing changed.

These lines are not used.

--
Dmitry.




More information about the wine-users mailing list