emacs 한글사용 문제
글쓴이: ptmono / 작성시간: 월, 2006/01/02 - 1:09오전
fedora 4와 kde를 사용하고 있습니다. 한글입력기로 nabi를 사용하고 있습니다.
nabi와 emacs를 동시에 사용하였을 때 emacs에서 한글을 쓸 수 없었습니다.
nabi를 끈 상태에서 emacs에서의 한글입력에는 문제가 없었습니다.
/etc/sysconfig/i18n 파일은 다음과 같습니다.
LANG="en_US.UTF-8" SUPPORTED="en_US.UTF-8:en_US:en:ja_JP.UTF-8:ja_JP:ja:ko_KR.UTF-8:ko_KR:ko" SYSFONT="latarcyrheb-sun16" #export LANG=ko_KR.euckr export XIM_PROGRAM=/usr/bin/nabi export XMODIFIERS="@im=nabi" export GTK_IM_MODULE=xim export QT_IM_MODULE=xim
emacs를 쓸때마다 나비를 끄고 다시 인터넷을 할 때에는 나비를 켜고...
한가지 특이한 사항은 konsole 상에서
$ LANG=ko_KR.euckr emacs
로 실행을 하면 nabi를 사용하고 있는 상태에서도 emacs 상에서 한글 입력이 가능하다는 것입니다.
그리고 저장상의 문제가 있어 다음의 글을 읽고 설정을 하여주었습니다.
http://bbs.kldp.org/viewtopic.php?t=61967&highlight=emacs+%C7%D1%B1%DB
UTF-8을 사용하고 있습니다. 방법이 없는지요?
Forums:


한글/영어 전환 키를 어떤 것으로 쓰고 계시나요?Emacs는 자체
한글/영어 전환 키를 어떤 것으로 쓰고 계시나요?
Emacs는 자체 input method를 포함하고 있기 때문에, 나비와 같은 한글 입력기가 불필요합니다. 사실 Emacs와 나비가 같은 키로 한글/영어로 전환할 때 약간의 문제가 생길 수 있는데, 입력이 불가능할 정도는 아닙니다.
제 경우는, Emacs를 실행할 때, LANG=C emacs로 실행하며, utf-8 설정 및 한글 설정을 위해 다음과 같은 코드를 씁니다. (필요없는 것들, 예를 들어 세벌식 자판과 같은 설정은 ';'를 앞에 붙여서 comment 처리하기 바랍니다.)
(require 'cl) (when enable-multibyte-characters (set-language-environment "Korean") (setq-default file-name-coding-system 'utf-8) ;; comment out if you use 3 bulsik (setq default-korean-keyboard "3") (setq default-input-method "korean-hangul3") (setq input-method-verbose-flag nil input-method-highlight-flag nil) ;;;; give highest priority to euc-kr (prefer-coding-system 'utf-8) (set-default-coding-systems 'utf-8) (add-hook 'quail-inactivate-hook 'delete-quail-completions) (defun delete-quail-completions () (when (get-buffer "*Quail Completions*") (kill-buffer "*Quail Completions*"))) ;(set-selection-coding-system 'euc-kr) (set-selection-coding-system 'utf-8) ;;(unless window-system ;;(menu-bar-mode -1) ;;(set-keyboard-coding-system 'nil) ;;(set-terminal-coding-system 'euc-kr)) ;; Hangul Mail setting (setq-default sendmail-coding-system 'euc-kr) ;; For use of `emacs -nw' in Korean terminal emulator (if (and (null window-system) (null noninteractive)) (progn (set-keyboard-coding-system 'utf-8) (set-terminal-coding-system 'utf-8))) ;; hangul printing for ps-mule.el (setq-default ps-multibyte-buffer 'non-latin-printer) ;; turn off C-h during input (eval-after-load "quail" '(progn (define-key quail-translation-keymap "\C-h" 'quail-delete-last-char) ;;(define-key quail-translation-keymap "\C-?" ;; 'quail-translation-help) (define-key quail-translation-keymap "\C-?" 'quail-delete-last-char) )) ;; The default coding system of the dired buffer is utf-8. (add-hook 'dired-before-readin-hook (lambda () (set (make-local-variable 'coding-system-for-read) 'utf-8))) ) (defun unicode-shell () "Execute the shell buffer in UTF-8 encoding. Note that you'll need to set the environment variable LANG and others appropriately." (interactive) (let ((coding-system-for-read 'utf-8) (coding-system-for-write 'utf-8) (coding-system-require-warning t)) (call-interactively 'shell)))참고로 위 설정 중 일부분은 신정식님의 글에서 인용하였음을 밝힙니다. (신정식님의 Korean FAQ의 사이트가 어디로 옮겼는지 모르겠군요..)
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Korean Ver: http://cinsk.github.io/cfaqs/
댓글 달기