How to see Japanese characters in java, etc

***UNDER CONSTRUCTION***. If you can confirm or deny that these instructions are needed, above and beyond the Solaris instructions, PLEASE EMAIL ME!

Get a unicode font

If you're not running X as your windowing system, you're on your own for this part. But if you can still install a Unicode font on your system, skip to the next section down the page, "Modifying font.properties".

The first thing to do is to get a unicode font. This is unexpectedly difficult. The most popular one I've found (although "popular" is almost a misnomer) is the "uni24" font. Current download locations that I know of are at:

If you find uni24.bdf somewhere, instead of uni24.pcf, you probably will want to run "bdftopcf" on it, to create uni24.pcf from it.

Put the uni24.pcf file in a font directory, and run "mkfontdir ." there, to update the font catalog in that directory.

After the font is added to a system font directory, you will have to do "xset fp rehash" ONCE, and never again.

If you are not a system administrator, you will probably have to manually add this to your font path, with "xset fp+ /home/user/font_directory". You will have to do this command, and also "xset fp rehash", every time you log in.

Modifying font.properties

Whereever your java run-time stuff is installed, there will probably be a directory called "lib", and in that directory, there will be a file called "font.properties". This controls how fonts are displayed. You will have to open up this file in your favourite editor, and make adjustments to it.

The quick and easy way, is to just add some lines to the top of the file:

   #adjustment to display Kanji
   dialog.plain.3=uni24
   fontcharset.dialog.plain.3=CharToByteUnicode
Note1: The '.3' is meant to be the last number used for "dialog.plain". If there is already a "dialog.plain.3", bump up the number.

Note2: Change "uni24" to whatever the real name of the font is.

Note3: If you were being thorough, you would also add appropriate lines for serif, sansserif, monospaced, and dialoginput. However, jdrill only needs the "dialog" entries to work correctly.

You should now be able to run jdrill, and actually see what you're trying to learn!


phil@bolthole.com
Bolthole