Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

Chinese input: using fcitx and SCIM

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
Szplug
n00b
n00b
Posts: 33
Joined: Sun Nov 03, 2002 1:54 am
Location: Raleigh North Carolina

Chinese input: using fcitx and SCIM

  • Quote

Post by Szplug » Thu Sep 30, 2004 6:28 am

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.
Top
mglauche
Retired Dev
Retired Dev
User avatar
Posts: 564
Joined: Thu Apr 25, 2002 9:55 am
Location: Germany
Contact:
Contact mglauche
Website

  • Quote

Post by mglauche » Thu Sep 30, 2004 9:26 am

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 :)
Top
y0zza
n00b
n00b
Posts: 68
Joined: Fri Jul 30, 2004 8:13 pm

  • Quote

Post by y0zza » Thu Sep 30, 2004 4:36 pm

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: Select all

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.
Top
Hauser
l33t
l33t
User avatar
Posts: 650
Joined: Sat Dec 27, 2003 9:19 pm
Location: 4-dimensional hyperplane

  • Quote

Post by Hauser » Thu Sep 30, 2004 5:03 pm

I only use ~/.xinitrc to setup my Chinese environment, for fcitx:

Code: Select all

export LC_CTYPE=zh_CN
export XMODIFIERS="@im=fcitx"
export XIM=fcitx
export XIM_PROGRAM=fcitx
exec fcitx&
exec startkde
for scim:

Code: Select all

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/s ... pshot1.png
http://www.linuxfans.org/nuke/desktop/s ... nshot1.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!
Top
pro
n00b
n00b
Posts: 8
Joined: Mon Aug 09, 2004 4:41 pm
Location: Sydney

  • Quote

Post by pro » Thu Sep 30, 2004 6:30 pm

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.
Top
Szplug
n00b
n00b
Posts: 33
Joined: Sun Nov 03, 2002 1:54 am
Location: Raleigh North Carolina

Hmm, still not working

  • Quote

Post by Szplug » Fri Oct 01, 2004 6:49 am

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: Select all


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?
Top
y0zza
n00b
n00b
Posts: 68
Joined: Fri Jul 30, 2004 8:13 pm

  • Quote

Post by y0zza » Fri Oct 01, 2004 10:38 am

I'm not sure of any specifics with fcitx input, but the guide by liquidx does state:
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.
Top
iExcel
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 102
Joined: Fri Jan 17, 2003 7:43 am
Location: Oakville, ON

  • Quote

Post by iExcel » Sat Dec 18, 2004 4:17 am

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: Select all

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.
Top
Post Reply

8 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy