Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Chinese input: using fcitx and SCIM
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Szplug
n00b
n00b


Joined: 03 Nov 2002
Posts: 33
Location: Raleigh North Carolina

PostPosted: Thu Sep 30, 2004 6:28 am    Post subject: Chinese input: using fcitx and SCIM Reply with quote

Hi,

I have been able to get both fcitx and SCIM to run thanks to http://dev.gentoo.org/~liquidx/chinese/chinese-v1.html but, I don't know how to actually use them. fcitx is closest to my expectations; after randomly clicking icons on the configuration bar I can type in a pinyin word, eg 'wo' and get a list on which the 'wo' character is #1. But if l try to click it or press '1' or space some other character appears in gedit. That is, I don't know how to accept the obvious character. If anyone can say how it's supposed to work I'd appreciate it.

SCIM configuration is more intelligible to English speakers, but when I type 'wo' I get unfamiliar characters, without the Chinese 'I'. I'm a beginning student of Chinese.

The sites with documentation I've found on the wider internet are either in Chinese or out of date - if anyone's using either of these methods, could you explain how in a few lines?

Thanks very much.
Back to top
View user's profile Send private message
mglauche
Retired Dev
Retired Dev


Joined: 25 Apr 2002
Posts: 564
Location: Germany

PostPosted: Thu Sep 30, 2004 9:26 am    Post subject: Reply with quote

i did have some sort of success using scim .. but in order to use it, i had to set my LANG to zh_CN (or zh_TW, if you want to use the traditional ones).

The bad point of it was, that the complete application switched to chinese, which is far beyond my level of comprehension :)
Back to top
View user's profile Send private message
y0zza
n00b
n00b


Joined: 30 Jul 2004
Posts: 68

PostPosted: Thu Sep 30, 2004 4:36 pm    Post subject: Reply with quote

Make sure SCIM is switched to chinese mode, if what you type doesn't actually look recognisable (!) - I use scim-chinese for smart pinyin input, and disable all irrelevant input methods from the SCIM configuration window so that only smart pinyin is active when I switch to SCIM. Perhaps you weren't using the pinyin input?

Smart pinyin is very quick and useful indeed :)

Screenshot of typing "wo" in Firefox

Using an English UTF-8 locale (en_GB.UTF-8 ), SCIM works fine and without the app interface switching to chinese. I believe just setting LC_CTYPE also works.

Relevant sections in my .xinitrc:
Code:

export LANG=en_GB.UTF-8
scim -f socket -c simple -ns socket -d
scim -f x11 -c socket -s socket -d
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim
export XIM=SCIM
export XIM_PROGRAM=SCIM


The two instances of scim is so that I can input via GTK2 in GTK2 apps and through XIM for non-GTK2 apps. I'm not sure if I need to export all those variables, but it works :lol: and I can type chinese via XIM and GTK2.
Back to top
View user's profile Send private message
Hauser
l33t
l33t


Joined: 27 Dec 2003
Posts: 650
Location: 4-dimensional hyperplane

PostPosted: Thu Sep 30, 2004 5:03 pm    Post subject: Reply with quote

I only use ~/.xinitrc to setup my Chinese environment, for fcitx:
Code:
export LC_CTYPE=zh_CN
export XMODIFIERS="@im=fcitx"
export XIM=fcitx
export XIM_PROGRAM=fcitx
exec fcitx&
exec startkde

for scim:
Code:
export LC_CTYPE=zh_CN
export XMODIFIERS="@im=SCIM"
export XIM=SCIM
export XIM_PROGRAM=SCIM
scim -s pinyin -d
exec startkde

The above are for Simplified Chinese, if you want to use Traditional Chinese you use "export LC_CTYPE=zh_TW.Big5" instead.
Here're some of my screenshots:
http://www.linuxfans.org/nuke/desktop/screenshot/41432ed349aa6snapshot1.png
http://www.linuxfans.org/nuke/desktop/screenshot/40b7cc9f44dfaScreenshot1.png
_________________
AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl

Do I like to compile everything?
Positive definite!
Back to top
View user's profile Send private message
pro
n00b
n00b


Joined: 09 Aug 2004
Posts: 8
Location: Sydney

PostPosted: Thu Sep 30, 2004 6:30 pm    Post subject: Reply with quote

when u set ur LC_CTYPE, for simplified chinese don't set it to zh_CN.gb18030. Coz xorg-x11 doesn't support it. And u'll find gtk will have heaps of trobule with it.... not sure about qt coz i don't use qt. But gb2312( maybe it's 2313 i can't remmber), is enough.

and when u use fcitx, u can simply select the charactor by using the number indicated. ie 1 for the first charactor and 2 for the 2nd, etc...

fcitx just looks neater than scim, both program and interface .... but that's personal opinion.
Back to top
View user's profile Send private message
Szplug
n00b
n00b


Joined: 03 Nov 2002
Posts: 33
Location: Raleigh North Carolina

PostPosted: Fri Oct 01, 2004 6:49 am    Post subject: Hmm, still not working Reply with quote

Here are screenshots:

First, when I've just typed 'wo' into gedit:
http://www.sevenleaguesoftware.com/screen1.png
Then, after I hit '1', & get a bogus character:
http://www.sevenleaguesoftware.com/screen2.png

Arg; well thanks, mlgauche, y0zza, hauser and pro for your replies. The fact that I /do/ get some character makes me wonder if I haven't got a wrong font somehow; I'm using

~> echo $LC_CTYPE
zh_TW.Big5

But, the .xsession guide here:
http://dev.gentoo.org/~liquidx/chinese/chinese-v1.html
under fcitx has the line:
Code:


if [ "${XLANG}" = "zh_CN.gb2312" -o ${XLANG}" = "zh_CN" ]; then
  # good settings
else
  # give error
fi


which makes me wonder, can fcitx be used with the traditional encoding?
Back to top
View user's profile Send private message
y0zza
n00b
n00b


Joined: 30 Jul 2004
Posts: 68

PostPosted: Fri Oct 01, 2004 10:38 am    Post subject: Reply with quote

I'm not sure of any specifics with fcitx input, but the guide by liquidx does state:
Quote:
FCITX is a fast and small XIM implementation that only does Simplified Chinese (zh_CN.gb2312) character input.
Perhaps that's why you're getting 'bogus' characters?

I'd recommend getting SCIM working, however. This does support both traditional and simplified chinese, and the smart pinyin works very well indeed. Much faster than inputting and selecting one character at a time.
Back to top
View user's profile Send private message
iExcel
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jan 2003
Posts: 102
Location: Oakville, ON

PostPosted: Sat Dec 18, 2004 4:17 am    Post subject: Reply with quote

y0zza wrote:

Using an English UTF-8 locale (en_GB.UTF-8 ), SCIM works fine and without the app interface switching to chinese. I believe just setting LC_CTYPE also works.

Relevant sections in my .xinitrc:
Code:

export LANG=en_GB.UTF-8
scim -f socket -c simple -ns socket -d
scim -f x11 -c socket -s socket -d
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim
export XIM=SCIM
export XIM_PROGRAM=SCIM

This works when I do a startx but does not when I have X loaded automatically at startup. Any ideas? TIA.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum