This article is from the Hangul & Internet in Korea FAQ, by Jungshik Shin jshin@minerva.cis.yale.edu with numerous contributions by others.
On Unix host, there are a few editors for Hangul. To edit Hangul file with
any of these editors, you have to set terminal 8bit-clean. See Subject 16
Mule is a Multilingual Extension to the GNU Emacs. Mule 1.0 and 2.x are
based on Emacs ver.18 and have superceded Nemacs(Nippon Emacs?).
[Contribution by Choi,Woohyung]. Mule 2.3 is still widely used in and
outside Japan, but the release of GNU Emacs 20 with Mule features included
by default made Mule 2.3 (based on Emacs 18.x) obsolete. I recommend
everyone still using Mule 2.3 upgrade to GNU Emacs 20 or Hanemacs(based on
GNU Emacs 19.3x).
As mentioned above, GNU Emacs 20 (the newest is 20.2) includes all the
features added by Mule development team and is truly multilinguial. You have
to get three files, emacs-M.N.tar.gz, leim-M.N.tar.gz(for Hangul input)
and intlfonts.tar(that includes Hangul X fonts contributed to X consortium
by Daewoo. You don't need to get this file if you already have Daewoo and
other Hangul X11 fonts and are not interested in languages other than those
covered by iso-8859-1 and Korean. See Subject 6 for details on Hangul X11
fonts) where M is 20(or larger) and N is 2 for the newest version as of
Ocotober, 1997. All three of these files are available at the GNU archive(
ftp://ftp.prep.ai.mit.edu/pub/gnu/ is the original site and there are a
number of mirrors around the world including KREONET archive and CAIR
archive in Korea). If Hangul characters are displayed as hollow boxes,
invoke emacs with "-fn fontset-standard" option. Please, note that you need
to press CTRL-\(instead of more familiar shift-space) to toggle input method
between Hangul and English. If invoked with '-nw' option from within hanterm
and other hangul terminal emulators for MS-Windows and Mac, you can use
shift-space(or whatever your terminal emulator uses to switch between Hangul
and English).
A mixture of successes and failures have been reported as to using Hangul
Input Method offered by X11 instead of leim included in GNU Emacs 20. HP/UX
10.x(if terminal-coding-system is set to euc-kr) seems to sort of work, but
Linux and Digital Unix don't work well. According to Chung, Jae-youn at
crisp@hugsvr.kaist.ac.kr, XEmacs under Solaris 2.5 reportedly(not confirmed)
works well with X Input Method(htt or is).
It'd be a good idea to add the following lines(posted by Choi, Jun-Ho at
junker@jazz.snu.ac.kr) to your X resource file(e.g. ~/.Xdefaults or
~/.Xresources) to avoid the hassle of designating the fontset in command
line(i.e. invoking emacs with 'emacs -fn fontset-standard'). You need to
customize this to make it suitable for your environment (Hangul fonts you
have and the resolution of your X display, etc).
Emacs.Font: *-fontset-standard
Emacs.Fontset-0: -misc-fixed-medium-r-normal-*-12-120-*-*-m-60-fontset-6,\
korean-ksc5601:-hanyang-kodig-medium-r-normal--12-120-*-ksc5601*-*
Emacs.Fontset-1: -*-courier-medium-r-normal-*-12-120-*-*-m-70-fontset-7,\
korean-ksc5601:-hanyang-kodig-medium-r-normal--14-140-*-ksc5601*-*,\
japanese-jisx0208:-misc-fixed-medium-r-normal--14-*-jisx0208*-*
XEmacs(formerly Lucid Emacs) 20 also includes Mule features, but its
multilinguial support is a little bit behind that of GNU Emacs 20.
FAQ for Mule(which unfortunately doesn't reflect recent changes in GNU Emacs
20/Mule) is available in http://www.etl.go.jp/~mule/. (Korean translation of
Mule FAQ is also available at the same site). For the up-to-date information
on Emacs 20(Mule), you may wish to subscribe to Mule mailing list by sending
a message with 'subscribe' in the message body to mule-request@etl.go.jp.
Detailed instruction for setting Mule 2.x for Hangul is found in
hlatex-guide.ps at CTAN archives and CAIR archive along with HLaTeX 0.9xe
distribution. Without installing HLaTeX 0.9xe, it can be printed out with
any postscript printer or non-PS printer and ghostscript See Subject 11 for
HLaTeX.
GNU Emacs 20.0.x needs different settings to use Hangul. You may add
following lines to ~/.emacs if you use it primarily for Korean. [Sent to
Mule-mailing list by Kim, Deogtae at dtkim@camars.kaist.ac.kr]
(set-language-environment "Korean")
;;(load-library "korean") ;; this doesn't seem to be necessary in Emacs 20.x
;; Remove comment if you want to use three set keyboard, instead
;; (select-input-method "Korean" "korean-hangul3")
;; Or better is use the following line
;; (setq default-korean-keyboard "3")
(setq-default file-name-coding-system 'euc-kr)
;;; Interactive setting of clipboard coding system.
;; This should be included in standard emacs lisp package.
(defun set-clipboard-coding-system (user-coding-system)
"Set `clipboard-coding-system' for communicating with other X clients.
When sending or receiving text via cut_buffer, selection, and clipboard,
the text is encoded or decoded by this coding system.
A default value is `iso-latin-1'"
(interactive "zClipboard coding system: ")
(setq clipboard-coding-system user-coding-system))
;; Proper copy and paste with other windows in window environment
(set-clipboard-coding-system 'euc-kr)
;; In Emacs 20.3, use the following instead for cut and paste in EUC-KR
;; (per Chung jae youn jay@pllab.kaist.ac.kr)
(set-selection-coding-system 'euc-kr)
;; To use Shift-Space instead of CTRL-\
;; to toggle input methods in window environment
(global-set-key [?\S- ] 'toggle-input-method)
;; these lines are necessary for those who use Emacs/Mule in terminal
;; environment such as Hanterm and other Hangul terminal emulators running
;; under MS-Windows and Mac with '-nw' option
(if (and (null window-system) (null noninteractive))
(progn
(set-keyboard-coding-system 'euc-kr)
(set-terminal-coding-system 'euc-kr)))
;; Hangul Mail setting
(setq sendmail-coding-system 'euc-kr)
;; Hangul Usenet Newsgroup setting
(gnus-mule-add-group "han" 'euc-kr)
For further details on mail and news related settings, see Subject 9 and
Subject 24, respectively.
Mule(rather,it has to be called GNU Emacs now that GNU Emacs has accomodated
all the enhancements of Mule) has been in active development and necessary
Hangul(acutally language setting) setting may vary from version to version
until sort of stabilized version comes out perhaps in late 1997.
Accordingly, what I include here(pros and cons, bugs, configuration, etc)
may or may not be applied to a specific version of Emacs/Mule. What follows
has to be added to site-start.el (if you have root previlege) or ~/.emacs as
an ordinary user.
Mule 2.3 has been ported to Windows 95/NT and you can use Hangul in
Korean/Japanese(and perhaps Chinese/Taiwanese) Windows 95/NT with it. For
details, see http://www.nkgw.elec.keio.ac.jp/~han/, Han, Jeonghoon's web
page. There are a couple of other solutions(which seem to be better) based
on Emacs 20.x. See http://calab.kaist.ac.kr/~dtkim/java/tools/emacs.html.
In early 1995, Hangul-aware Emacs was released by Kim,Kang-hee(at
khkim@archi.snu.ac.kr) and it's available in /hangul/editor/HanEmacs at CAIR
Archive and major Hangul archives. There are two versions of them, one based
on GNU emacs( hanemacs-gnu-0.99) and the other( hanemacs-lucid-1.0) based on
Lucid Emacs. The most recent version with enhanced JOHAB encoding handling
and Hanja conversion is 2.1 (based on GNU Emacs 19.30) released in May, 1996
and available at CAIR archive and SUNsite Korea.
kisskiss@soback.kornet.ne.kr compared GNU Emacs 19.30 and HanEmacs 2.1 and
applied patches to convert the former to the latter to GNU Emacs 19.34 to
enable Hangul I/O in GNU Emacs 19.34. The author of HanEmacs merged the
change and released HanEmacs 19.34 on August, 25, 1997. It's available as
hanemacs-19.34.tar.gz in the same place as HanEmacs 2.1.
For Hanemacs 19.34, you might have to add the following lines to .emacs in
your home directory(or in compile time, you can add it to site-init.el)
[posted to han.comp.os.linux by Choi Jun Ho at junker@jazz.snu.ac.kr]
(cond
((and
(boundp 'emacs-major-version)
(= emacs-major-version 19)
(= emacs-minor-version 34))
(standard-display-european t)
(set-input-mode (car (current-input-mode)) (nth 1 (current-input-mode)) 0)))
There is another emacs patched for Hangul. It's patched for Japanese first
and called nemacs. A little patch to nemacs 3.3(available at CAIR archive)
made possible using Hangul. Nemacs is old and has been superceded by Mule,
so that you'd better use Mule or Hanemacs, instead. [Contribution by
Choi,Woohyung]
A trouble with these patched version of Emacs or GNU Emacs 20.x is that
they're so huge(at least 10 MB) that you may not install it without
permission of the system administrator at your site. There's a way, however,
to use Hangul in GNU Emacs prior to 20.x(perhaps in Lucid Emacs(now
XEmacs),too). Add following lines to '.emacs' in your home directory and
you'll be able to use Hangul with ordinary Emacs when launched inside
Hanterm or other Hangul emulator(See Subject 2) with '-nw'(no window) option
to emacs. Be aware that you have to bear with some inconvenience(e.g. a
single Hangul syllable requires two key strokes to delete) using this
method.
(standard-display-european t)
(require 'iso-insert)
(require 'iso-syntax)
(standard-display-8bit 160 255)
(set-input-mode (car (current-input-mode))
(nth 1 (current-input-mode)) 0)
[Quoted from Hangul Linux-help mailing list digest by Lee,Jong-hyuk at
wings@baram.kaist.ac.kr. Probablely, original contribution by Kim,Daeshik at
dkim@cwc.com]
A far better way to use Hangul in GNU Emacs prior to version 20 (invoked
with '-nw' option from within Hangul terminal emulator : See Subject 2) is
install ksc.5601.el in your home directory and put following lines in
~/.emacs.
(if (and (null window-system) (null noninteractive))
(progn
(load-library "~/ksc5601.el")
(standard-display-ksc5601 t)
(substitute-key-definition
'backward-delete-char-untabify
'ksc5601-backward-delete-char-untabify
lisp-interaction-mode-map)))
ksc5601.el was made by Deoktae Kim(dtkim@camars.kaist.ac.kr) at KAIST and is
currently available at
ftp://hugsvr.kaist.ac.kr/pub/elisp/incoming/. [Contribution by
Chung Jae-youn at crisp@hugsvr.kaist.ac.kr]
Some people managed to use GNU Emacs 20 with the Hangul Input Method server
for X window instead of "built-in" input mechanism. In HP/UX 10.x, Chung,
Jae-youn succeeded in connecting Emacs to Hangul Input method server by
setting terminal-coding-system to euc-kr. Needless to say, the environment
variable XMODIFIERS should be to set to "@im=input_server_name". Under
Digital Unix 4.x, Emacs 20.x doesn't work while Hangul Emacs works with
Hangul Input Method server if the toggle key for Hangul and English is set
to CTRL-Space instead of Shift-Space according to Choi, Jun Ho at
junker@jazz.snu.ac.kr
Stevie is a vi clone, and there is Japanese stevie named Jstevie. You can
edit hangul documents on Hanterm with Jstevie. You should compile it after
hacking a couple of lines of Makefile. Please set the code you use to EUC
codeset in the Makefile. [Contribution by Choi,Woohyung]
Stevie is now an obsolete program. You are advised to use Hangul Elvis by ,
Park, Chong-Dae, a member of SPARCS. The most recent version is helvis1.8h2+
available at SPARCS archive or its mirrors at CAIR Archive, I-NET archieve
,and Sunsite Korea. Park, Chong-Dae went at length to make helvis have as
complete Hangul support as possible and his efforts paid off well.
nvi is an enhanced vi included in BSD 4.4 and the newest version 1.79 can be
obtained at ftp://ftp.cs.berkeley.edu/ucb/4bsd. Jun-ichiro itojun Itoh
(itojun@itojun.org) did the M17N(multinationalization) of nvi and made the
m17n patch available at ftp://ftp.foretune.co.jp/pub/tools/nvi-m17n/. It's
NOT L10N(localization), but M17N or I18N. Hence, more than one
language(other than English) can be intermingled in a single document just
as in Mule. After applying m17n patch to nvi 1.79 source, compile it with
following commands in the top of nvi source tree.
% cd build % ./configure --enable-multibyte=euc-kr --program-prefix=n % make % su % install
 
Continue to: