How to use Chinese characters in Athena: (3) Settings for Emacs (cont.)

Input Chinese characters in Emacs

Once your Emacs can display Chinese characters correctly, you can try to use the MULE (Multilingual Environment) for Emacs to input Chinese characters in Emacs. It can be done in two simple steps:

  1. Set languange environment to Chinese (GB or GBK).

    If you use menu, click Options->MULE->Set Language Environment->Chinese->Chinese-GB

    Note: If you haven't set coding system correctly in your .emacs file, you might need to set it manually at this time.

  2. Toggle input method to a Chinese input method. (You can find it in the MULE menu, too.)

Alternatively, to make these two steps easier, you can write a elisp function in your .emacs file, and bind it to a hotkey, e.g., Ctrl-Space.

(defun my-chinese-mode ()
(interactive)
(set-language-environment 'Chinese-GB)
; or (set-language-environment 'Chinese-GBK)
(set-input-method 'chinese-py-punct)
)

(global-set-key (kbd "C-SPC") 'my-chinese-mode)

Then when you press Ctrl-Space in your Emacs, it will switch to Chinese input method.


Note: You would probably feel the chinese-py-punct input method is quite naive if you, like me, have been used to some "advanced" input methods such as Ziguang Pinyin. Anyway, it provides a simple way to input most frequently used Chinese characters, without installing other software in your system.

Other use of Emacs (BBS client, etc.)

Emacs has a built-in terminal-emulator, in which you can telnet to remote servers that support ANSI colors. "M-x ansi-term" will start a terminal-emulator in a new buffer. This is particularly useful and convenient, if you ever want to connect to a BBS in your Emacs. Of course you have to make sure your Emacs can display Chinese characters properly before you connect to a Chinese BBS site. If you want many BBS-specific features (such as anti-idle), however, you might turn to some "professional" telnet clients. As far as I know, qterm is a good choice under Linux.

For more setting about Emacs, you might want to try the following resources (many other useful documents can be found online, try google!):

posted on Sunday, September 19, 2004 1:15 AM by wenyang

Comments