This brief document discusses how I got Japanese working on my NetBSD/mac68k UN*X
system. There are probably others ways to accomplish the same end result. In the
end, I built my system using KTerm, Wnn4, Kinput2, and jvim. Since I am a vi
person, I chose jvim as my editor. The same system should work with mule.
Coming Soon! This page in Japanese.
NetBSD still does not have the locale system implemented like FreeBSD or Linux. So when you run the command kterm & you will probably get an error message like:
I have not had any problems using KTerm even though I always get that warning. At some point, I am going to try to implement the locale system for NetBSD based on the FreeBSD version.
Once you have a Japanese-capable terminal program, you still find that many programs will not display Japanese properly. If you use cat, it displays Japanese but if you use more or less it does not. Unless the docuemnt is very short, when you use cat, you lose the top of the text. So you have to be creative with head or tail. The same ftp site that included KTerm, also included a patched version of less that is supposed to display Japanese in KTerm. I installed it, but it never displayed Japanese properly for me.
However, from the same site, I did download a program called Ng. Ng is an emacs clone that is Japanese-capable. I am not used to emacs, but I was able to get it to display long Japanese documents without too much trouble. The problems with Ng are that it include absolutely no documentation and that it does not always follow "standard" emacs commands.
Download KTerm 6.20
(74k)
Download Ng 1.3
(60k)
Download Less with ISO patch
(130k)
According to my research, there are three Kanji servers: Wnn, SJ, and Canna. Canna seems to be common among Linux users. I chose Wnn because I found it already compiled at the Axe ftp site. Once you install Wnn, then all you need to do is set it to start up automatically. I made the following entry in /etc/rc.local
Basically, then Wnn runs in the background. You can set up a single Kanji server on a LAN and have other workstations access it remotely if desired.
Download Wnn4 (1.2M)
Once your Kanji server is setup, the next thing you need is an FEP. In the MacOS world, KanjiTalk comes with the Kotoeri FEP. You can also get ATOK which is available for MacOS, Windows, and some flavors of UN*X. The Wnn package includes an FEP called uum. Ng is supposed to work with uum, but I could never get uum to start up. It always gave me an error message to the effect that my "terminal was not strong enough." Now there's a helpful error message!
My research indicated that Kinput2 was the FEP of choice, so I downloaded the source for Kinput2. Getting it to compile properly was a bit of a struggle (mostly because I am not very familiar with the use of make), but in the end I got a working copy. I had a difficult time getting the -lcrypt option in at compile time. Here are some tricks to get it to compile:
Next you need to set some environment variables. You need to specify a JSERVER so Kinput2 can find your Kanji server. On a stand alone system, it will be localhost, but on a network it will be the hostname of the server running Wnn. You also need to set the XMODIFIERS environment variable so that X knows you are using Kinput2 as your input method. I use C shell, so I have added the following two lines to my .cshrc:
With Kinput2 installed, I thought that I was ready to go. But I found out that you need to adjust up your KTerm settings to use Kinput2. In my .Xresources file, I added the following settings for KTerm:
Once KTerm is setup, you can switch back and forth between Japanese and normal input modes. I am
used to the MacOS Kotoeri FEP and I have used the Micro$oft FEP that comes with
Windoze as well. Of course, Kinput2 is completely different, so I have to unlearn my
Kotoeri habits. Gradually, I am becoming used to it and now I rarely need to use
MacOS anymore. Since Kinput2 is a pain to compile, I will make a binary package and
put it here for downloading someday soon.
Download Kinput2 (186k)
Incidentally, I use Pine as my e-mail program and the pico editor appears to take the Kanji input but it gets mangled. I have set jvim and my alternate editor in Pine. Pine will display Japanese properly if you run it in a KTerm and set the Character Set to ISO-2022-JP in the Pine configuration. I can read Japanese e-mail and also the fj.* and other Japanese Usenet newsgroups in Pine.
If you want to be able to enter Japanese into your shell, you will need to get tcsh, which is also available from the Axe FTP site. I tried it and it works, but I don't really need it, so I still use csh. Although it compiles quite easily, I have made up a binary package for jvim and it is available for download.
Download Jvim (153k)
Download Tcsh (210k)

In the screenshot above, I am using jvim to edit a text file. When I want to insert Japanese, I press SHIFT-SPACE and I go into Japanese input mode (basically Kinput2 kicks in). As you can see, Kinput2 presents a nice window of possible Kanji for a selection.
In the future, I would like to be able to add Japanese ability to Internet programs. Pine works fine for e-mail and Usenet news. However, I also want to be able to read Japanese homepages using jlynx. For now, I am running Netscape off of an Intel machine so I can view Japanese pages.
Back to my MacBSD page.
This page and all pages in this site are Copyright 1997-98 by Mark Andres. All right reserved.