LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   SCIM chinese input works selectively (Mandrake 10) (https://www.linuxquestions.org/questions/linux-software-2/scim-chinese-input-works-selectively-mandrake-10-a-158797/)

houshuang 03-17-2004 01:13 AM

SCIM chinese input works selectively (Mandrake 10)
 
So far my RH 10 install has gone very well, and finally I seem to be switching to Linux fulltime after numerous tryout installs during the last few years. One of the persistent problems has been Chinese input (I am not Chinese, but live in China and study Chinese and use it on a daily basis). This time, I've gotten a lot further than before, but still not perfect. I start up the scim server, set the LC_CTYPE=zh_CN.gb2312 and XMODIFIERS=@im=scim, then start oowriter from that shell. Wow - Chinese input works like a dream! BUT that is the only programme I have gotten it to work with - both Thunderbird and Firefox, two of my most commonly used programmes, do not work when started right after from the exact same shell...

Any help would be most appreciated!

--
On a side note, copying Chinese text between programmes (ie oowriter, which works, and Thunderbird, which displays incoming Chinese mails perfectly - does not work). Also, the Chinese fonts Firefox uses are quite ugly and hard to read, as compared to Windows (still Firefox), and I can't get Kopete to display Chinese, let alone enter it.

China has a huge population that will be more and more interested in Linux as the WTO tightens copyright enforcement for Windows etc. My girlfriend loved Knoppix when she saw it. But if they have to go through this entire ordeal to get something working that works out of the box with Win XP, it's not going to happen. Ideally, Chinese input would be one more choice on the KDE language switch bar (which works perfectly for me from Norwegian to English, although it would be nice if it remembered its mode for each window, rather than making global switches, or maybe there is a setting for this?), without implying any locale settings etc. (It should be possible to type in Chinese without having Chinese menus for example. And what if you want to type in Chinese and Japanese intermittently?)

Thanks again (sorry for the outburst of opinion)

Stian / houshuang
Hangzhou, China

JDW 03-17-2004 03:50 PM

SCIM chinese input works selectively (Mandrake 10)
 
Hi,

I've tried SCIM recently on MDK 9.2 (MDK10 shouldn't be any different really), but I use fcitx - http://www.fcitx.org/ - this seems to have worked with everything I have tried it with, and the input bar is pretty cool too...

SCIM works with unicode, but with fcitx you need to set the locale settings to zh_CN (LANG, LC_CTYPE). XMODIFIERS will be @im=fcitx as well...

I agree totally with you about how easy it is to use the keyboard switcher in Windows, and how easy it is to change from Chinese to Japanese to Korean or whatever whilst you're typing one document, but unfortunately at the moment Linux doesn't have this functionality, so we just make do as best we can...I am no programmer so I can't help much there!

cheers,

jdw

houshuang 03-17-2004 10:11 PM

Thanks for the reply! In deed, I did try out fcitx, partly after reading the gentoo chinese faq. It works like a dream in every program, _except_ I cannot change the input method to Pinyin, it only let's me do wubi. Since I have no idea about wubi, this is completely useless. I tried all the short keys, also checked the config files if there was a "default input method" setting etc, and it isn't working. Could I be missing some files or something? (I did a source install, with the latest version).

Thanks again! When only I can get this fixed, I am up and running...

Stian

JDW 03-17-2004 10:23 PM

SCIM chinese input works selectively
 
yeah, i hear you...make sure you download the proper version of fcitx 2.0, the release candidate only had wubi in it...

the full version has intelligent (zhineng) pinyin...

cheers,

jdw

ThePenguin 08-18-2004 09:53 PM

Does it work with Korean text? I need to input korean text and can't atm. :(

JDW 08-18-2004 10:04 PM

SCIM chinese input works selectively (Mandrake 10)
 
Hi,

fcitx is for Simplified Chinese only...

give SCIM a try...it has Korean input.

Any good Linux distro will ami as the default Korean input editor though, does it not work???

cheers,

jdw

ThePenguin 08-18-2004 10:08 PM

ahh i dont know about AMI working or not. -_-

How do I check? :newbie:

Went on a tangent, sorry. Anyways AMI sounds good and so does
SCIM, I had a look at SCIM and it looks nice~

Have a nice day! ^^

JDW 08-18-2004 10:18 PM

hi,

to see if ami is installed type :

$ whereis ami

at a command line prompt and if it is installed it will output the location of the binary of this application, e.g. /usr/bin/ami

if not then it most likely isn't installed, which would suggest that you did not select Korean support when you installed Mandrake.

It would have been on about the first or second screen during install, in order to install support for additional languages you would have had to have pressed the "Advanced" button, and then select Korean from the list...

if you did select it then the installer would have installed Korean fonts, locales and the ami input server so that you could input Korean.

So, before we move on to how you get the Korean input working, please check & answer the above and we will take it from there...

jdw

ThePenguin 08-18-2004 10:29 PM

Quote:

Originally posted by JDW
hi,

to see if ami is installed type :

$ whereis ami

at a command line prompt and if it is installed it will output the location of the binary of this application, e.g. /usr/bin/ami

if not then it most likely isn't installed, which would suggest that you did not select Korean support when you installed Mandrake.

It would have been on about the first or second screen during install, in order to install support for additional languages you would have had to have pressed the "Advanced" button, and then select Korean from the list...

if you did select it then the installer would have installed Korean fonts, locales and the ami input server so that you could input Korean.

So, before we move on to how you get the Korean input working, please check & answer the above and we will take it from there...

jdw

Alright, (thanks for helping me by the way!) I know I installed all the korean language support GNOME and KDE. I did use the advanced tab.
LOL, by the way, your "whereis" command helped me find the SCIM executable. I may need assistance with it as well -_-.

EDIT: lol, got SCIM to work and im not sure how( i see it in the bar on my corner). I found some tables as well.

I did the "whereis ami" and got $whereis ami <next line> ami: (blank)
so "ami: (blank)" probably means I dont have it >.<.:study:

JDW 08-18-2004 10:44 PM

SCIM chinese input works selectively (Mandrake 10)
 
Hi,

If you installed Korean support it should have installed ami by default...anyway, from your main KDE or GNOME Start menu go to Configuration, and select Install New Packages...(I'm doing this from memory, but I think that's the order on the menu items!)

Select to put the list in alphabetical order, and ami should be there...select ami and it will ask you for one of the Mandrake CDs...insert that, let it install and then make sure you are in a Korean locale environment* and run a program like oowriter with ami with the following command :-

$ ami & oowriter

* you can do this simply by typing the following commands at the command line :-

$ export LANG=ko_KR
$ export LC_ALL=ko_KR
$ export LC_CTYPE=ko_KR
$ export XMODIFIERS=@im=ami

test this by typing the following command :-

$ locale

it should spit out a dozen or two lines of settings all ending in ko_KR...

good luck, and if it still isn't happening, please feel free to ask...

jdw

ThePenguin 08-18-2004 10:59 PM

I did everything you told me and got to the following line (last step)

bash: XMODIFIERS-@im-ami: command not found

i did a $locale and all were KO, so I'm in good shape there, now my problem is
how do I put text in OpenOfficeWriter?

edit: and do I have to do this everytime at boot up?

JDW 08-18-2004 11:04 PM

SCIM chinese input works selectively (Mandrake 10)
 
$ export XMODIFIERS=@im=ami


should be an " = " sign, not a -

jdw

ThePenguin 08-18-2004 11:14 PM

OK, I got everything up and going. But I still need a font to use in OOW...I know i got the korean TTF's. How do I use them?
I checked the fonts in OOW..None are Korean characters

JDW 08-18-2004 11:20 PM

SCIM chinese input works selectively (Mandrake 10)
 
cool, almost there...

try any font that has the words "batang", "dotum" or "gulim" in the title...

if there aren't any of these, you should be able to find some on the Mandrake CDs (but think you will find these)...the Mandrake font installer is pretty nifty as well in these situations...

cheers,

jdw

ThePenguin 08-18-2004 11:25 PM

I have all 3...But they do not give korean text~

JDW 08-18-2004 11:41 PM

SCIM chinese input works selectively (Mandrake 10)
 
if you are running ami, press CTRL + SPACE to activate the input window...

jdw

ThePenguin 08-19-2004 12:03 AM

That puts a gray space >.<...I noticed when I input "ami & oowriter" i get the ami setup screen~

JDW 08-19-2004 12:12 AM

SCIM chinese input works selectively (Mandrake 10)
 
how about I run Mdk 10 tonight Australian-time at home, and recreate your scenario...I'll try and get Korean happening one way or another! sorry about the wait, I don't have Linux at work, so I can't test it out...

cheers,

jdw

ThePenguin 08-19-2004 12:18 AM

:D :D :D Thank you so much for helping me! ^^

ThePenguin 08-19-2004 09:30 PM

any luck?

JDW 08-20-2004 01:42 PM

SCIM chinese input works selectively (Mandrake 10)
 
Hi,

I started up Mandrake 10 in my default Australian English KDE environment (which is irrelevant), opened a Konsole terminal window, and typed :

$ export LANG=ko_KR
$ export LC_ALL=ko_KR
$ export LC_CTYPE=ko_KR
$ export XMODIFIERS=@im=ami

and then

$ ami & oowriter

the ami config window opened (you don't have to do anything in that though), and then the Open Office window, then I pressed SHIFT + SPACE (sorry, I said CTRL + SPACE before, that works on most of the Chinese input apps) and a little input window that appears in the text editing area of oowriter changes from [EN] to [KO].

When I enter text I get Korean, no problem at all.

Try again following the above steps, and let's see how that goes...

jdw

p.s. we've really gone off on a tangent from the original post, we should have started a new thread...but Chinese & Korean etc usually have similar issues so I guess it's ok...

ThePenguin 08-20-2004 06:13 PM

that did it, thanks so much!

Yeah the asian countries usualy do share the same problems with inputing characters~(I hope that doesnt come out wrong)

ThePenguin 09-05-2004 12:26 AM

i screwed up the hot key set :

Kor-Eng. mode Toggle has been erased some how
Conversion to Hanja has also been erased some how
Symbol Input is still <Key>F3
and Clear Buffer is still Ctrl <Key>Return

Can you tell me what settings you have? =)

reloaded M10. In uber shape. GO GO Linux. Im a newb and so far everything is working and configured perfect! Now to developing!

JDW 09-05-2004 04:41 PM

Hi,

This tests my memory (I'm at work/no Linux here)...

Firstly I think these settings can be set to whatever suits you, but the defaults are :-

KOR/ENG toggle : SHIFT + SPACE
Hanja Conversion : F9

cheers,

jdw

ThePenguin 09-05-2004 04:47 PM

Hmm...Do you know how to have those 4 scripts load on startup so I dont have to type them everytime I start Linux?:scratch:

JDW 09-05-2004 05:33 PM

just add the 4 scripts on to the end of your user's ~/.bashrc file. log out/ log in again and you're away! For me, being an English speaker (if Australian can be called English!?!) I would set up a separate user account with these Korean settings, and just log into that when required from a terminal window like Konsole...

jdw

ThePenguin 09-05-2004 08:00 PM

ROFL. That worked like a charm....but.....Now everything is in Korean...~ HELP! lol

JDW 09-05-2004 08:08 PM

yeah, but it's the trying to solve problems that's ½ the fun***! if everything's in Korean, maybe remove/comment out the "LC_ALL=ko_KR" line and see what that does. as long as your LC_CTYPE and LANG variables are Korean, you should be able to type in Korean with ami...

jdw

*** in the broadest sense of the word "fun", it can be bloody frustrating at times...

ThePenguin 09-06-2004 12:21 AM

like a charm. tooshay my friend tooshay (sp i know...im lazy)

chad2003 09-24-2004 11:37 AM

fcitx works with firefox and OOs
 
fcitx works with firefox and OOs

for firefox and thunderbird, I need to add a few lines at the beginning of the startup script (firefox or thunderbird) like the following:

## lines I added
XMODIFIERS="@im=fcitx"
export XMODIFIERS
export LC_ALL=zh_CN
export LANG=zh_CN
## end of lines I added

moz_pis_startstop_scripts()
{
...


Also, in order to show all the chinese chars correctly without having converted into unicodes, I have to set the default encoded of firefox to gb2312 (edit->preferences->languages->default encoding). Also, the chinese fonts may be too small in firefox by default, I have to set the minimum size to 16 in order to view them confortably (the setting is in edit->preferences->fonts and colors->minimum size. Now everything works perfectly.

secretlydead 04-30-2005 01:23 AM

JDW,

sorry to do this here, but i know you'll answer if i do:

how can i make scim with korean and chinese work on kopete?

(i think you should have your own forum for asian language questions.)

JDW 05-01-2005 05:08 PM

Hi secretlydead,

sorry to be absolutely no help, but I can't say that I've ever used kopete, so I am not sure what the issue would be. It'll give me something to do tonight after work though! I'll see if I can figure anything out with it and let you know...

jdw

secretlydead 05-01-2005 10:36 PM

thanks.

it's on mandrake 10.1, by the way. i'm using an english user, scim (which works for both korean and chinese on AbiWord, and web browsers).

it's still a bit frustrating that i have to use windows for work (since i have to talk to chinese/koreans on msn) and us customs releases all of it's information on cd's that have to be loaded onto windows. hopefully, by the time the WTO rules clamp down on piracy in this country, WINE will work well enough to overcome these problems.

i look forward to any answer you can give me.

daniel.

liucougar 05-03-2005 10:15 PM

what's your problem with kopete?

It works as the other KDE apps

secretlydead 05-03-2005 10:38 PM

doesn't work on mine.

i'm using mandrake 10.1 and i'm an english user.

right now, i can type 中国话 or 한국의 with no problem here in mozilla or in abiword.

however, in kopete, no korean or chinese options come up when the cursor is in the chat box and i click on the scim (running in the background) icon located in the lower right hand corner. only the options american keyboard and english keyboard come up.

when i do the same action in abiword or in mozilla, an extra two options - korean and chinese - come up.

liucougar 05-03-2005 11:08 PM

what about the other kde apps?

if none of them work, then you did not setup KDE correctly in order to work with scim

consult: http://www.scim-im.org/wiki/document...tion_of_system

secretlydead 05-04-2005 12:16 AM

OK.

did exactly what the page said, then started a new session but it didn't work.

export LC_CTYPE="en_US.UTF-8"
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim

should i have typed in those commands as "root"?

should i have used a locale other than english?

i completely ignored what is said about skim because i don't believe it's on here. was that a mistake?

thanks.

liucougar 05-04-2005 08:24 AM

you can input under mozilla, so I assume your locale is set correctly.

you settings seem to be fine.

under a console in X, do an export, and see whether the variables are set to what you specified

secretlydead 05-04-2005 08:39 PM

one step closer
 
hi,

yes, i checked the export list, and it's all as modified above.

now, i can bring up the scim toolbar as i'm typing anywhere in X, and it lets me change to korean or chinese or whatever, but it doesn't actually let me type that way.

JDW 05-04-2005 09:16 PM

hi secretlydead,

are these settings as above global or are they limited to a particular console session? If they are global then it should work on kopete, mozilla, office etc. regardless of where you launch the application from.

If you are only making these settings for a particular session, then you have to launch kopete from the same terminal window.

You probably already realise this, but I am just trying to cover all bases...

cheers,

jdw

secretlydead 05-04-2005 09:32 PM

for the sake of argument, i set up the system as above, and launched kopete from the same terminal. no dice.

but, no, i didn't know that. how do i know if i have set up something globally?

second, i'm on an upgrade from mandrake 10 to 10.1. would that make a difference? i hope not, because i really don't want to reinstall this whole thing. (and, anyway, i was never able to install 10.1 without an upgrade because of the new graphical interface drivers (?) they use.)

liucougar 05-04-2005 09:45 PM

try this to start your kopete:
LC_CTYPE="en_US.UTF-8" XMODIFIERS=@im=SCIM kopete

while scim is running

secretlydead 05-04-2005 09:54 PM

that worked!

thanks.

so, how do i load that in as the default configuration? (so that when i, or another user clicks on the graphical interface, it gives that command line) preferably in a way that i don't have to do it for every application that i want to work.

(thanks, y'all)

liucougar 05-04-2005 09:57 PM

your problem is that you did not set the correct environment variables globally

did you check the wiki doc in scim-im.org?
http://www.scim-im.org/wiki/document..._configuration

secretlydead 05-05-2005 12:57 AM

Yes,

in file:/etc/sysconfig/i18n

I added the lines:
GTK_IM_MODULE=scim
XIM_PROGRAM="scim -d"
XMODIFIERS=@im=SCIM

and changed LC_CTYPE=en_US
to LC_CTYPE="en_US.UTF-8"

restarted the computer and kopete doesn't work.

what did I do wrong?

(kopete works typing the command that you listed above)

secretlydead 05-06-2005 02:10 AM

Problem Solved.
 
I solved the problem.

Well, not so much solved as went around it.

I installed Mandriva 2005 (formatted the partition and threw it on) which seems to work great. The only thing was that I had to change default fonts to one of the Chinese ones instead of Sans so that some things in some programs would work.
The only test is to see if it can look at a Chinese Windows computer over Samba and see the Chinese filenames. Or if it could execute Chinese filenames (through WINE, etc), that'd be great too.

Anyway, I am curious about a few things anyway:
1) Might my trouble have had something to do with upgrading 10.0 to 10.1?
2) Might my trouble have had something to do with my chown i18n to my username in order to change the file? If so, how do you change ownership back to root?

Thanks.

pochi 05-09-2005 03:14 AM

Hi. I would like to ask people in this thread whether you can type anything using SCIM in Kmail composer window on Mandrake (10.1 or LE2005).

In my experience, when SCIM is used as the input method, key strokes are totally ignored by KMail(Kontact) composer window. I could not even type alphabets. This only happened in KMail composer window. I could type alphabets and Japanese characters without a problem in all other software I tried (including Kopete, Mozilla, OOWriter, Kate). And it seems it doesn't matter which language I use, because the same problem appears even when I replace all "ja_JP" with "en_US." It just seems Kmail composer window doesn't like SCIM.

My system is setup as follows:
- I installed Mandrake Linux 10.1 from DVD with "English(American)" and "Japanese" selected as Languages. (So all necessary RPMs are supposed to be installed.)
- I use KDE Desktop.
- For example, I chose Japanese and SCIM in LocaleDrake(User). After a logout and login, the abovementioned problem is observed. In this situation, the file ".i18n" looks like what follows:

LANGUAGE=ja_JP:ja
GTK_IM_MODULE=scim
LC_ADDRESS=en_US
LC_COLLATE=ja_JP
QT_IM_MODULE=scim
LC_NAME=en_US
LC_NUMERIC=en_US
LC_MEASUREMENT=en_US
LC_TIME=ja_JP
LANG=ja_JP
LC_IDENTIFICATION=en_US
LC_MESSAGES=ja_JP
LC_CTYPE=ja_JP
LC_TELEPHONE=en_US
ENC=eucj
LC_MONETARY=en_US
XIM_PROGRAM="scim -d"
LC_PAPER=en_US
XMODIFIERS=@im=SCIM

secretlydead 05-09-2005 07:18 AM

KMail seems to work fine with Mandriva 2005. I can input korean and chinese flawlessly. I do not know anything about typing japanese, so I can't really test it out.

I do have japanese support installed, though, so if you want to tell me:
- what to type (in the english alphabet)
- what should appear on the screen
- what japanese input method to use
i'd be happy to test that out for you.

pochi 05-09-2005 05:22 PM

Thanks for a quick response.

I think I'm having more basic problem here (I may be wrong). I'm saying that key strokes are totally neglected in KMail composer window, even when I'm not trying to type Japanese---that is, when the keyboard icon in the system tray indicates "English/Keyboard." Even keyboard shortcuts don't work. Besides, typing Japanese and alphabets totally works in the main window of KMail (such as search-text field), and the problem only appears in the composer window. Weird, isn't it?

Let me try to give a simpler example for non-Japanese users. I hope I'm making sense here. I followed the SCIM instruction for Mandriva as English(American) being system wide locale setting. Here, /etc/sysconfig/i18n is set by LocaleDrake like this:
Code:

SYSFONTACM=iso15
LANGUAGE=en_US:en
LC_ADDRESS=en_US
LC_COLLATE=en_US
LC_NAME=en_US
LC_NUMERIC=en_US
LC_MEASUREMENT=en_US
LC_TIME=en_US
LANG=en_US
LC_IDENTIFICATION=en_US
LC_MESSAGES=en_US
LC_CTYPE=en_US
LC_TELEPHONE=en_US
LC_MONETARY=en_US
LC_PAPER=en_US
SYSFONT=lat0-16

Next, I made /home/myname/.i18n and it now looks like this:
Code:

GTK_IM_MODULE=scim
XIM_PROGRAM="scim -d"
XMODIFIERS=@im=SCIM

Note that I did not specify Japanese anywhere. I only configured to use SCIM. The little keyboard icon in the system tray lets me choose only English/Keyboard or English/European (This is expected). And typing normal alphabets work everywhere except in KMail composer window. Does this illustrate the problem well enough? Let me know.

It looks as if KMail composer window is neglecting my personal configuration in /home/myname/.i18n.

It is good to know that it's working for somebody else, anyway.

JDW 05-09-2005 05:46 PM

hi,

type this in a terminal window :-

$ export LC_CTYPE=ja_JP.UTF-8

then launch scim

the Japanese input methods should be there to use now...

cheers,

john


All times are GMT -5. The time now is 03:45 PM.