4/21/99
Updated 10/3/99
I'm a Japanese minor, and I recently wanted to install Japanese support on my LinuxPPC box so I can type in Japanese. So I checked the web. There aren't that many informative sites, and none had the specific quick-start info I was looking for. Also, it's hard to go very far without running into a Japanese web page, and if you're like me and still learning, those are basically dead ends.
Links:
You need some special way of inputting kana and kanji. There are many choices of protocols, servers, and interfaces, with names like Wnn, umm, canna, kinput2, etc. And then there are different terminal emulators like kterm and rxvt. I'll make it easy for you: get Canna, kinput2, and kterm. To do some Japanese input, all you need is Canna, kinput2, a terminal that can handle kanji, and a Japanese-aware text editor.
If you have a RedHat-based machine (I run LinuxPPC, so that's what the links are to), you can get all of these at ftp://ftp.pc-mind.co.jp or there's another good repository at ftp://core.ring.gr.jp/pub/linux/JRPM/ (with easy-to-find x86 RPMS). Specifically:
(Make sure you get a version that says "canna" in the file name.) Kinput2 is the thing that starts intercepting your keystrokes when you press shift-space and displays hiragana as you type romanji. When you press the spacebar after typing in some romanji, kinput2 takes what you've typed, asks Canna for options, and then displays the options for you.
Basic kinput2 instructions:
Canna is the thing that kinput2 talks to. It's the backend server that takes hiragana and outputs a list of possible kanji. You never interact with it directly; you just need to make sure it's running.
Kterm is an xterm that's built to support the display of kanji fonts. If you're going to be typing into a terminal (for a text editor), you need this or rxvt with kanji support compiled in. Kterm is a bit better than rxvt though (rxvt had font and artifact issues when I tried it).
Kterm comes set up by default to run kinput2 when you press shift-space. This is good and saves you a lot of headache. Use kterm.
It's possible to use emacs/mule, but I never got anywhere with it. I use jed, which is damn ugly but works.
This program is neat. You draw a kanji on the canvas (as best you can if you only have a mouse), click the search button, and it gives you a list of the top 5 candidates. You can then click on one and X-paste it into your kterm running jed. For those kanjis you know how to draw but not how to pronounce.
This program takes stdin and depending on the switches converts it to other formats. The most useful one is kanji->hiragana (or if you're using a non-kterm terminal, kanji->romanji would be very handy).
Usage: 'kakasi -?' gives you a quick list. What you probably want is 'kakasi -JH -s'. This converts kanji to kana pronunciation (and inserts spaces, which are nice). If you don't have a kterm but want to read Japanese email, for example, use 'kakasi -Ea -Ka -Ha -Ja -s', which converts everything to ASCII.
Trouble? Make sure you're running the servers. It would probably be a good idea to put canna and kinput2 commands in your .Xclients, so they're launched when you start X. You can, of course, launch and kill them normally if you're just experimenting. In order to type in Japanese, you need both kinput2 and canna to be running. You also need to use a multi-byte language aware text editor (like jed-jp) and be using a terminal that 1) can display kana and 2) is set up to start kinput2 when you press shift-space. Kterm comes like this by default.
Printing was a bitch for me. Here's what I ended up doing:
To test it, type a file in your text editor with kinput2. Save it as test.euc (it's EUC encoding). Notice that you can view it in Netscape (as long as you set the Character Encoding correctly).
To convert to PostScript, run nkf to a2ps (ASCII to PostScript) like this: 'nkf -s test.euc | a2ps -nP > test.ps'. Assuming you have Ghostview, you can run 'ghostview test.ps' and see your beautiful kanji.
Important note: So you've got your .ps file and it looks great. Forget about printing it from work. You need access to those kanji ghostscript fonts you installed, and fonts aren't embedded in PostScript files (at least not those made through this procedure). In fact, you might even not be able to print to a PostScript laser printer, since they're supposed to have their own fonts. (There are a bunch of packages in the RPMS directory that contain various extra fonts; you might want to experiment with them.) I use ghostscript to rasterize to my DeskWriter; I've never had any luck with laser printers.