nooop3 / fcitx

Automatically exported from code.google.com/p/fcitx
GNU General Public License v2.0
0 stars 0 forks source link

fcitx doesn't input characters in wine #665

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
http://paste.ubuntu.com/1632101/

Problem: Korean (Hangul) characters are not "input" into the wine (StarCraft 
II) application. I see the fcitx graphic that shows me the characters I'm 
typing but none of the characters are seen in wine. fcitx works fine with my 
browser, chromium.

What steps will reproduce the problem?
1. I have wine installed along with StarCraft II on a fully updated ArchLinux 
x86_64.
2. CTRL+Space brings up normal input graphics and I can see the Korean 
characters I'm typing in the input graphic. The characters are not input into 
the application. Copy/Pasting Korean characters works fine so the application 
is capable of displaying the characters.

I also have the same problem with xterm (the terminal emulator).

Original issue reported on code.google.com by p...@batbytes.com on 10 Feb 2013 at 6:02

GoogleCodeExporter commented 8 years ago
set your locale to ko_KR.UTF-8

Original comment by yyc1992@gmail.com on 10 Feb 2013 at 6:16

GoogleCodeExporter commented 8 years ago

Original comment by yyc1992@gmail.com on 10 Feb 2013 at 6:16

GoogleCodeExporter commented 8 years ago
I'm using:

env WINEPREFIX=$HOME/.wine.hots LC_ALL=ko_KR.UTF-8 LANG=ko_KR.UTF-8 
/usr/bin/wine 'C:\Program Files (x86)\StarCraft II 2012 Beta\StarCraft II 
Beta.exe' -opengl

The locale change has no effect.

Thanks for your help!

Original comment by p...@batbytes.com on 10 Feb 2013 at 6:37

GoogleCodeExporter commented 8 years ago
Since you also have problem in xterm, I suppose all application have XIM have 
some problem on your system.

Check this page:
http://fcitx-im.org/wiki/Configure_%28Other%29

And you can paste your fcitx-diagnose output here.

Original comment by wen...@gmail.com on 10 Feb 2013 at 5:17

GoogleCodeExporter commented 8 years ago
Then try zh_CN.UTF-8. wine is doing stupid things depending one the locale. (I 
though the working locale's are zh/ja/ko but it is probably zh_CN/ja/zh_TW)

Original comment by yyc1992@gmail.com on 10 Feb 2013 at 5:20

GoogleCodeExporter commented 8 years ago
wine can do xim on all locale.

but here you remind me another possible problem, that do you have your locale 
in locale.gen?

"And When you must use XIM, please make sure, your locale must NOT be C or 
POSIX and need to be a valid locale (no matter which language), and need to be 
generated if you are using glibc (locale-gen). When you are using im module, 
there is no such limitation. "

From: 
http://fcitx-im.org/wiki/FAQ#When_use_Ctrl_.2B_Space.2C_Fcitx_cannot_be_triggere
d_on

Original comment by wen...@gmail.com on 11 Feb 2013 at 2:09

GoogleCodeExporter commented 8 years ago
K, I have just tested wine with different locales and seems that it is indeed 
being able to work with arbitrary locale. The problem is still caused by your 
locale setting although it is the encoding setting that causes the trouble.

I am not a expert on how xim encoding works but seems that commit string cannot 
work if the input method and the client are using different encoding's, (which 
is exactly what you have seen). So event if you don't want to have a ko_KR 
locale, please at least set your global locale to en_US.UTF-8 (or any *.UTF-8 
you like). You should at least being able to use input method in xterm after 
doing this, for wine program's see NOTE below.

P.S. Some wine program may have some internal encoding that wine cannot handle 
correctly yet, in which case you may still not be able to use input method 
correctly (not sure if StarCraft has this problem but at least simpler wine 
programs like notepad should work).

Original comment by yyc1992@gmail.com on 11 Feb 2013 at 4:23

GoogleCodeExporter commented 8 years ago
First I want to say, thanks a lot for the help!

I've tried all the advice given including changing my global locale in 
/etc/locale.conf:

$ cat /etc/locale.conf 
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8

And en_US.UTF-8 and ko_KR.UTF-8 (which I'm apparently not using) are both 
generated:

$ locale -a
C
en_US
en_US.iso88591
en_US.utf8
ko_KR
ko_KR.euckr
ko_KR.utf8
korean
korean.euc
POSIX

So, xterm works now but wine does not. I tried using the notepad program and 
even that doesn't work. notepad just shows a bunch of "|" characters instead. 
I've tried changing these environment variables

  export GTK_IM_MODULE=xim
  export QT_IM_MODULE=xim

but this had no effect. Since you said that you got notepad working, I'm hoping 
I may just be doing something else wrong. [If I can get notepad working, maybe 
SC2 will work.] Any ideas?

Original comment by p...@batbytes.com on 15 Feb 2013 at 2:26

GoogleCodeExporter commented 8 years ago
Is typing English working in notepad? What about copy-and-paste? Are you sure 
you have the right font setting?

P.S. {GTK,QT}_IM_MODULE has nothing to do with xim. They are just used to 
specify what is used in gtk/qt program's. Please keep 
fcitx(-frontend)-{gtk{2,3},qt} installed and keep these env set as fcitx.

Original comment by yyc1992@gmail.com on 15 Feb 2013 at 2:45

GoogleCodeExporter commented 8 years ago
Yes English works in notepad. copy-paste doesn't work in notepad but does work 
in SC2. How do I change the font setting?

Okay I'll keep {GTK,QT}_IM_MODULE as fcitx. Thanks for the information.

Original comment by p...@batbytes.com on 15 Feb 2013 at 4:08

GoogleCodeExporter commented 8 years ago
Okay I've been following the instructions here:

http://allencch.wordpress.com/2012/02/03/cjk-fonts-in-wine-and-also-works-with-i
bus-input/

which also happens to be very similar to my own problem. I followed the steps 
and notepad with Hangul works now. SC2 still does not. I think I may have 
messed up one of the steps so I'll revisit it this weekend and get back to you.

Original comment by p...@batbytes.com on 15 Feb 2013 at 4:46

GoogleCodeExporter commented 8 years ago
Then it's pretty clear that you have now set up xim correctly (therefore both 
xim and notepad can get what you type correctly, although notepad obviously 
don't know how to display them properly).

For notepad, well, it is wine/notepad specific font setting, which has nothing 
to do with input method now. (And I am not a expert on this. I would guess the 
setting dialog of notepad?) (but you may not really interested in making this 
work unless you think it is better than any other editors... hopefully not....)

For SC, I would guess it has some internal encoding that wine cannot handle 
correctly yet. I am not using SC and I cannot provide any further help on this.

In all, as long as you can trigger the input method in an app, the app is able 
to connect to the input method (...obviously right...) and as long as you can 
use XIM to input in some apps, there is nothing the input method can help from 
that point. One thing that you may or may not want to try (but will really 
likely to case a lot of trouble) is to run both fcitx and SC in a different 
encoding (set in locale) (you may need to use --disable fcitx-dbus or you may 
have dbus assertion. This may make you not being able to use fcitx in all other 
apps.) If you manage to successfully input for one locale, the reason is very 
likely be the one I mentioned above (encoding mismatch). (Both xim and wine is 
a mess on encoding.... and that's basically y you have the problem .....)

Original comment by yyc1992@gmail.com on 15 Feb 2013 at 4:51