[SCIM] Problems using scim with Emacs

Rodolfo Medina romeomedina at libero.it
Fri Oct 22 02:12:16 PDT 2004


Hi.

Now I can use scim to input both Simplified and Traditional Chinese
without any problems, using kwrite.
Instead, with Emacs, I don't manage to input the right characters:
when try to I select a character typing the corrispondent number
I don't get the character I wanted but another one different.
=46or example, to type the word 'China' in Traditional Chinese,
instead of  =D6=D0=87=F8 I get  something different, that I can't reproduce=
 here and=20
will send in my next message.

Can anybody provide help?

After installing scim I installed mule-gbk and the font simsun.ttf, and the=
n=20
configured Emacs, with the following steps:

1) From

    http://mule-gbk.sourceforge.net/

   I downloaded the file mule-gbk-0.1.2004080701.tar.gz and installed it

2) I downloaded simsun.ttf from

    http://ftp.cdaan.com/sy/light/simsun.ttf

    and put it into the directories /usr/share/fonts/ttf/decoratives, =20
    /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=
=20
    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 .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 TEX=
T=20
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,\
               =20
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*-=
*,\
               =20
japanese-jisx0208:-misc-simsun-medium-r-*--16-*-*-*-*-*-jis0201*-0,\
                                       =20
       =20
mule-unicode-0100-24ff:-*-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1,\
       =20
       =20
mule-unicode-e000-ffff:-*-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1,\
    =20
       =20
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

5) I upgraded to emacs-21.3.

Thanks,
                Rodolfo



More information about the scim mailing list