2004-10-20 20:08:25 UTC
Hi.
On my PC I have Mandrake Linux 9.1,
and installed first scim and then mule-gbk-0.1.2004080701.tar.gz.
I'm having problems in inputting chinese characters within Emacs with scim method.
Insead, with kwrite, everything seems to be o.k.
For example, when I try to type the word 'China' with Emacs and scim,
in Traditional Chinese,
instead of 中國 I get 涓鍦
(but I don'y know if these characters will be correctly displayed here).
My version of Emacs is 21.3, freshly upgraded.
Could anyone provide help?
Below I'm reporting the steps I followed in the configuration of Emacs
after mule-gbk installation.
Maybe something wrong with them?
(If necessary, I can also report the steps I did with scim installation.)
Any help will be highly appreciated.
Thanks,
Rodolfo
1) First I installed scim.
The installation turned to be quite laborious because some problems arose during it,
but in the end it seemed to be successful.
2) Then I downloaded and installed mule-gbk-0.1.2004080701.tar.gz,
and then from
http://ftp.cdaan.com/sy/light/simsun.ttf
I downloaded the simsun.ttf font
and put it into the directory /usr/share/fonts/ttf/decoratives,
and put it into the directories:
/usr/share/fonts/ttf/decoratives,
/usr/share/fonts/ttf/western
and
/usr/X11R6/lib/X11/fonts/TTF,
then added the following lines to the files fonts.dir and fonts.scale
existing in those directories:
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-ascii-0
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-ibm-cp850
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-iso10646-1
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-iso8859-1
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-iso8859-15
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-koi8-r
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-big5.eten-0
3) I added the following lines to my .emacs:
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp")
(require 'mule-gbk)
(set-terminal-coding-system 'chinese-gbk)
(set-keyboard-coding-system 'chinese-gbk)
(set-language-environment 'chinese-gbk)
(setq locale-coding-system 'chinese-gbk)
(setq current-language-environment "Chinese-GBK")
;;; Unicode support, for Emacs CVS (21.3.50) only
(when (fboundp 'utf-translate-cjk-mode)
;; Turn on utf-translate-cjk-mode
(utf-translate-cjk-mode t)
;; Setup X selection for unicode encoding
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)))
(add-hook 'after-init-hook
(lambda ()
(load "utf-8")))
4) I created the file .Xdefaults and added to it the following:
Emacs.Font: fontset-song
Emacs.Fontset-0:-*-fixed-medium-r-*-*-16-*-*-*-*-*-fontset-song,\
chinese-gb2312:-misc-simsun-medium-r-*--16-*-*-*-*-*-gb2312*-*,\
chinese-big5-1:-misc-simsun-medium-r-*--16-*-*-*-*-*-big5*-*,\
chinese-big5-2:-misc-simsun-medium-r-*--16-*-*-*-*-*-big5*-*,\
japanese-jisx0208:-misc-simsun-medium-r-*--16-*-*-*-*-*-jis0201*-0,\
mule-unicode-0100-24ff:-*-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1,\
mule-unicode-e000-ffff:-*-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1,\
mule-unicode-2500-33ff:-*-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1,\
chinese-cns11643-5:-misc-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
chinese-cns11643-6:-misc-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
chinese-cns11643-7:-misc-simsun-medium-r-*--16-*-*-*-*-*-gbk-0