View previous topic :: View next topic |
Author |
Message |
iamlarryboy Guru
Joined: 25 Jan 2003 Posts: 480 Location: Prince George, BC, Canada
|
Posted: Sat Jan 25, 2003 10:24 pm Post subject: japanese input |
|
|
One of my roomates is japanese and would like to be able to write her family in Japanese. I have been trying to get Japanese input working with no success. I have gathered from the forums that i need to install i18n, canna, and kinput2 which I have done, however I do not know what to do now. I am using kde 3.1rc_5. It would also be a boon if there is a really easy way to switch between japanese mode and english mode.
thanks |
|
Back to top |
|
|
Kawada Apprentice
Joined: 22 Jul 2002 Posts: 159 Location: Florida, USA
|
Posted: Sat Jan 25, 2003 10:47 pm Post subject: |
|
|
Okay, so you've already emerged i18n, canna, and kinput2. Next, you want to make sure that canna gets loaded on startup, so do this as root Code: | rc-update add canna default | You can then start it by either restarting the computer, or running cannaserver as root. Also note that if your computer is ever powered down incorrectly (due to freezing, power failure, etc.) that cannaserver will leave a lock file sitting around that will need to be deleted before you can restart it (there will be a message in the startup text if this happens).
Now you need to setup you locales to accept Japanese input. You need to edit your session script (or .xinitrc if you use that). I will show you how it would look on my fluxbox system, but the method is similar for any other WM. The important parts of my .xinitrc Code: | exec /usr/X11R6/bin/kinput2 -canna &
export LANGUAGE=en_US
export LC_CTYPE=ja_JP
export XMODIFIERS="@im=kinput2"
/usr/bin/fluxbox |
Okay, what this does is the following. The first line starts kinput2, and tells it to use canna for its kana-kanji conversion. Next line sets the locale so that all of our menus and such will still be in English. The third line sets the locale so that it can accept Japansese characters and input. The next line tells the system to use kinput2 as its input method. And of course the final line starts my WM.
Now if you're using KDE apps (forgive me if some of the following is off, it's been a while since I've used KDE) you also need to go to the keyboard settings in the control panel, and add the Japanese keyboard settings in addition to English. You can then change between these two using the defined shortcut keys (by default it is ctrl+alt+k if I remember correctly).
Now assuming all of that is setup correctly, you should then be able to input Japanese in any app that will accept it by pressing shift+spacebar to start kinput2. The same keystrokes will stop it. As for its actual use, if your friend has ever used a Japanese input system before, he should have no trouble.
For more information, I have also made similar posts here and here. Good luck.
Edit: I don't believe you have to add the Japanese keyboard settings in KDE, but if you have a Japanese keyboard, or are used to the layout on a Japanese keyboard, it might be a good idea. The default US keyboard settings shoud work just fine for input of kanji and kana. _________________ Kawada
2002 Nethack Tournament -- 317th runner-up http://nethack.devnull.net/
Last edited by Kawada on Mon Jan 27, 2003 10:47 pm; edited 1 time in total |
|
Back to top |
|
|
plate Bodhisattva
Joined: 25 Jul 2002 Posts: 1663 Location: Berlin
|
Posted: Sun Jan 26, 2003 4:04 am Post subject: |
|
|
Great explanation! You'relarryboy, if you need anything else, there's a Gentoo-specific mini-tutorial at fellow Gentooist Scottro's website, and the author of Kiten (in KDE 3.1, check it out), Jason Katz-Brown, has a page on Japanese in KDE. |
|
Back to top |
|
|
iamlarryboy Guru
Joined: 25 Jan 2003 Posts: 480 Location: Prince George, BC, Canada
|
Posted: Mon Jan 27, 2003 8:20 am Post subject: Thanks |
|
|
Alright I have it working ... well sort of. It works with all kde apps except koffice. When I enable kinput2 with shift+spacebar kword will no longer take any input at all. Any Idea what might be causing this? Also I have been starting kde with the suggested .xinitrc method. This may be a stupid question but how can I do the equivilent with gdm? Thanks again. |
|
Back to top |
|
|
Kawada Apprentice
Joined: 22 Jul 2002 Posts: 159 Location: Florida, USA
|
Posted: Mon Jan 27, 2003 6:03 pm Post subject: |
|
|
Glad you're getting that to work. No real idea on KOffice, never used it. Run it from a console and see if you're getting any error messages on it. Try loading up a Japanese text file in it and see if it can even view it properly.
As far as doing all this through gdm, you can either make another session file under /etc/X11/Sessions/ that matches your .xinitrc, or you can simply edit the kde one that is already there.
While you're at it, maybe you should try making a session for a total Japanese enviroment (menus and everything) since this might help further diagnose the KOffice problem. This is the same as what you've done before, except it becomes Code: | LANG=ja_JP LC_ALL=ja_JP XMODIFIERS="@im=kinput2" | instead of Code: | LANGUAGE=en_US LC_CTYPE=ja_JP XMODIFIERS="@im=kinput2" |
If KOffice works under these settings, then that means it has a problem with the input-only approach. _________________ Kawada
2002 Nethack Tournament -- 317th runner-up http://nethack.devnull.net/ |
|
Back to top |
|
|
iamlarryboy Guru
Joined: 25 Jan 2003 Posts: 480 Location: Prince George, BC, Canada
|
Posted: Mon Jan 27, 2003 9:05 pm Post subject: sweet |
|
|
Thank you very much. I have given my friend her own account with a default all japanese session and it works great. The default fonts needed some adjusting though. Kword seems to work but it behaves differently than other apps. For example, In kedit I would type shift+space d e and it would pump out a charachter then s u and it would pump out another one. In kword i type shift+space d e s u enter before it will pump out anything. Wierd. Oh well I guess she will just have to use kedit. Again thanks a bunch! |
|
Back to top |
|
|
Kawada Apprentice
Joined: 22 Jul 2002 Posts: 159 Location: Florida, USA
|
Posted: Mon Jan 27, 2003 10:41 pm Post subject: Re: sweet |
|
|
iamlarryboy wrote: | Thank you very much. I have given my friend her own account with a default all japanese session and it works great. The default fonts needed some adjusting though. Kword seems to work but it behaves differently than other apps. For example, In kedit I would type shift+space d e and it would pump out a charachter then s u and it would pump out another one. In kword i type shift+space d e s u enter before it will pump out anything. Wierd. Oh well I guess she will just have to use kedit. Again thanks a bunch! |
Ah, that just reminded me of something else you may want to look into. Try running qtconfig, and look for an option relating to input style. It should have choices like "On the Spot", "Over the Spot", etc. These affect the way that qt apps (which all KDE apps are) display the characters you are inputting. You can try messing around with these options and see what effects it has on your apps. Personally, I would just stick with "Over the Spot," since this is basically the default X way of doing it. And supposedly "On the Spot" is still kinda buggy anyway. _________________ Kawada
2002 Nethack Tournament -- 317th runner-up http://nethack.devnull.net/ |
|
Back to top |
|
|
zhenlin Veteran
Joined: 09 Nov 2002 Posts: 1361
|
Posted: Tue May 20, 2003 8:50 am Post subject: |
|
|
Is this KDE-only? I'm guessing not, because the examples in the referenced webpages seem to include non-QT applications.
Is it UTF-8/UTF-16? It looks like it, but is there any special configuration needed? |
|
Back to top |
|
|
Kesereti Guru
Joined: 07 Nov 2002 Posts: 520
|
Posted: Tue May 20, 2003 6:49 pm Post subject: Re: sweet |
|
|
iamlarryboy wrote: | Thank you very much. I have given my friend her own account with a default all japanese session and it works great. The default fonts needed some adjusting though. Kword seems to work but it behaves differently than other apps. For example, In kedit I would type shift+space d e and it would pump out a charachter then s u and it would pump out another one. In kword i type shift+space d e s u enter before it will pump out anything. Wierd. Oh well I guess she will just have to use kedit. Again thanks a bunch! |
Sounds like KEdit is doing the right thing; at least in my opinion that's how a Japanese input system should work (that's how the ones I used in Japan worked anyway...) Perhaps you should file bugs for the KDE apps that don't deal with Japanese input gracefully? Maybe it can be fixed soon...I haven't used Japanese input all that much under KDE, but it looks like it might not just be a quirk of your system...
(...and is your Japanese friend cute? =P nihon no onnatachi ga chou~~ kawaii to omou...ne, sore ni toritsukarete isou da =P~ Er, I'll behave now and stop embarassing myself with my probably-horribly-borked Japanese, it's been a while since I've had to use it ^_^) |
|
Back to top |
|
|
Miaowara n00b
Joined: 09 Sep 2003 Posts: 41
|
Posted: Tue Sep 09, 2003 11:32 am Post subject: SJIS? |
|
|
Is there any way at all to use SJIS as an input method? As far as I can tell all Japanese Keitai are only able to read this encoding. If so how would one go about doing it? |
|
Back to top |
|
|
zhenlin Veteran
Joined: 09 Nov 2002 Posts: 1361
|
Posted: Wed Sep 10, 2003 8:36 am Post subject: |
|
|
iconv -f UTF-8 -t SJIS (or whatever the code is)
Most people should be able to read UTF-8. It is only a matter of telling that to the computer. |
|
Back to top |
|
|
Miaowara n00b
Joined: 09 Sep 2003 Posts: 41
|
Posted: Wed Sep 10, 2003 11:37 pm Post subject: |
|
|
Cool, thanks! The problem is it seems people using Japanese cell phones can't choose! |
|
Back to top |
|
|
rounin Tux's lil' helper
Joined: 13 Apr 2003 Posts: 84
|
Posted: Mon Dec 08, 2003 2:03 pm Post subject: |
|
|
Look at the document in my sig for some comprehensive information on using input methods in Korean and Japanese. A noteable thing about Japanese input methods is that they can use either the Canna or the Wnn server. (Though Canna doesn't work for me, unfortunately.) |
|
Back to top |
|
|
|