Mark Alford. Last updated: 2011-Oct-17.
Simplest method
.
To fix this, force emacs to use an appropriate font for
Japanese characters, such as VL_Gothic.
To do this, in your .emacs file, add the following:
(set-fontset-font (frame-parameter nil 'font)
'japanese-jisx0208
'("VL Gothic" . "unicode-bmp"))
(To see what font emacs is using for Japanese characters, position the cursor
over one of them and run the describe-char command,
by typing CTRL-u CTRL-X = or alternately by
ESC x describe-char.)
Alternate method
You can tell emacs what encoding system to use and what input method to use by specifying them in a special line at the top of the file, e.g:
%-*- coding: utf-8; current-input-method: japanese -*- This is in English. これは 日本語 です。
Possible codings include utf-8 (Unicode), japanese-euc, japanese-shift-jis, emacs-mule, etc. With this first line, emacs will automatically detect the coding and display the characters correctly. Without it, emacs will probably auto-detect Unicode anyway.
When you open your file (something like the example above) using emacs, it may warn you that some of the local variable values may not be safe, just type "y" to accept them. You can then switch to Japanese input method by typing CTRL-\ twice, ignoring the "value is nil" message. After than things work as described under "Simplest method" above.
For more general information on Japanese and computing, see Jim Breen's Japanese page.
Please sent comments, corrections, improvements to alford(at)physics.wustl.edu. Thanks to those who have done so, including Paul Wyatt of Toshiba and Andrew A. Adams of Reading University.