Unicode 版的 Debian/CLE
奇怪,不知什么原因,似乎我们的 Big5<->GB 转码程式没有转到信件的
正文。现在谨代重寄一次,希望在 debian-chinese-gb 上的朋友也能
看得到。
----- Forwarded message from Peter Hung <peter@coventive.com> -----
Date: Wed, 7 Feb 2001 23:13:47 +0800
From: Peter Hung <peter@coventive.com>
Subject: Unicode 版的 Debian/CLE
To: debian-chinese-big5@lists.debian.org
Content-Type: multipart/signed; micalg=pgp-md5;
protocol="application/pgp-signature"; boundary="/Uq4LBwYP4y1W6pO"
Hello,
很高兴,目前的 Linux 有个基本的 UTF-8 决解方式了,就是修改过的 rxvt 与
xcin (新的 xterm 好像也可以,但我没测试过)。
Linux 的 filesystem 也支援 UTF-8,所以您使用修改过的 rxvt 建目录与档案都
很正常,如此一来我们可以将目前已中文化的文件或是讯息档转至 UTF-8。至于
程式部分就请各位测试看看,有问题的我可以帮忙修,如此一来很快就可以建立
一个基本个 Unicode 中文版 Debian/CLE 了。 :-)
目前我测试过 micq (UID 6051557 目前我会挂在线上与您测试),可以用 UTF-8,
如果 irc client (xchat or bitchx) 也可以用,大家那可以在 channel 上直接交
谈。 :-)
Ok, 那就开始吧。 (以下为 Debian 2.2 环境)
1. 请建立 zh_TW.UTF-8 环境:
a. 请安装 glibc-2.2.x。
b. 编辑 /etc/locale.gen 加入
zh_TW.UTF-8 UTF-8
c. 执行 locale-gen 产生 zh_TW.UTF-8 环境。
d. 请安装 XFree86-4.02
e. mkdir /usr/X11R6/lib/X11/locale/zh_TW.utf8
f. cd /usr/X11R6/lib/X11/locale/zh_TW.utf8
g. cp ../zh_TW.Big5/Compose
h. cp ../en_US.UTF-8/XLC_LOCALE (暂时借来用用)
e. 编辑 /usr/X11R6/lib/X11/locale/locale.alias 加入
zh_TW.utf8 zh_TW.utf8
2. Unicode font,我是使用 debian 的 Unicode 字型。
您可使用以下指令查看字型正不正常。
xfd -fn -gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1
3. 编译 rxvt with utf8 encoding
请参考 Xianping Ge <xge@ics.uci.edu> 兄写的 rxvt-utf8/rxvt-multibyte
(附在这封信后面)
4. 编译 xcin with utf8 encoding (Sorry, 这有很多须要手动修改)
a. ftp ftp://freebsd.sinica.edu.tw/pub/phantomcat/xcin/xcin-2.5.2-utf8-last.gz
b. 解开执行 ./confiure
(Debian 者可加 --with-xcin-rcdir=/etc --with-xcin-dir=/usr/lib/xcin)
c. if you == 繁体使用者 then 在 config.h 加在
#define UNICODE 1
#define BIG5 1
goto label d
else if you == 简体使用者 then 在 config.h 加在
#define UNICODE 1
并且执行
cp cin/gb/sys.cin.gb2312 cin/utf-8/sys.cin
goto label d
d. make;make install
e. 修改 /etc/xcinrc 加入 zh_TW.UTF-8。您可参考随信附上的 xcinrc。
其中 alt-{3,4,5} 为简体的输入法。
5. 执行
a. 在 shell 下修改 LANG 与 LC_ALL 为 zh_TW.UTF-8
b. 执行 xcin
c. 执行 rxvt,请使用参数
-fn -gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1 -im xcin-zh_TW.UTF-8 -pt Root
OverTheSpot 好像还有点问题,要用也是可以 (不加上 -pt Root)。
Ok! 您会看到 xcin 出现,此时 xcin 使用 Unicode font,所以可以同时显示
多国字型。您可以切换输入法,并在 rxvt 中输入文字。我目前使用 vim 5.6
可以输入,但显示还有点问题,vim 6.0 支援 UTF-8 应该可以解决。
在 xcin-utf8 中加入线上转换输出为繁体或是简体,您只要在输入法中使用
"ctrl"+"alt"+"o" 可线上修改输出为繁/简体,而原本用来显示输入法英文名
称的视窗改为显示繁体的 "繁" 或是简体的 "简" 字,如此一来您可以敲出简
体给大陆的朋友,而大陆的朋友也可以敲出繁体字来。 :-)
无论如何,最基本的输入(xcin)、输出(rxvt) 与转码 (utf-convert/autoconvert)
都有了,大家可以开始建造一个 Unicode 的中文环境了。
- PhantomCat
--
Peter Hung * Email : peter@coventive.com
Engineer @ Coventive Technologies * Phone : 886-919-616-535
;
; Xcin resource file for GNU/Linux
;
; By T.H.Hsieh.
;
;
; Directories.
;
(define XCIN_DEFAULT_DIR "/usr/lib/xcin")
(define XCIN_USER_DIR ".xcin")
;
; This defines GUI attribute.
;
;(define INDEX_FONT "-sony-*-16-*-iso8859-1")
(define INDEX_FONT "-gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1")
(define FG_COLOR "white")
(define BG_COLOR "blue")
(define M_FG_COLOR "yellow")
(define M_BG_COLOR "darkred")
(define ULINE_COLOR "cyan")
(define GRID_COLOR "white")
(define X_GEOMETRY "45x2+200-1")
(define START_MAINWIN2 "NO")
(define MAINWIN2_GEOMETRY "27x1+200-1")
(define XCIN_HIDE "NO")
(define XKILL_DISABLE "NO")
(define ICCHECK_DISABLE "NO")
(define SINGLE_IM_CONTEXT "NO")
(define IM_FOCUS_ON "NO")
(define KEEP_POSITION_ON "NO")
(define DISABLE_WM_CTRL "NO")
(define DIFF_BEEP "YES")
;
; XIM Input Style Adjustments.
;
(define INPUT_STYLE '(Root OverTheSpot))
(define OVERSPOT_USE_USRCOLOR "YES")
(define OVERSPOT_USE_USRFONTSET "NO")
(define OVERSPOT_WINDOW_ONLY "NO")
;
; Special Trigger Keys.
;
;(define FKEY_ZHEN "ctrl space")
;(define FKEY_2BSB "shift space")
;(define FKEY_CIRIM "ctrl shift")
;(define FKEY_CIRRIM "shift ctrl")
;(define FKEY_CHREP "ctrl alt r")
;(define FKEY_SIMD "ctrl alt i")
;(define FKEY_IMFOCUS "ctrl alt f")
;(define FKEY_IMN "ctrl alt")
;(define FKEY_QPHRASE "shift alt")
;
; IM module default resources.
;
(define gen_inp_default
'((AUTO_COMPOSE YES)
(AUTO_UPCHAR YES)
(AUTO_FULLUP NO)
(SPACE_AUTOUP NO)
(SELKEY_SHIFT NO)
(SPACE_IGNORE NO)
(SPACE_RESET YES)
(AUTO_RESET NO)
(WILD_ENABLE YES)
(SINMD_IN_LINE1 NO)
(END_KEY NO)
(QPHRASE_MODE 0) ; 1: shift, 2: ctrl, 4: alt
(DISABLE_SEL_LIST "NONE")
(KEYSTROKE_REMAP "NONE")
(BEEP_WRONG YES)
(BEEP_DUPCHAR NO)))
(define bimsphone_default
'((N_SELECTION_KEY 9)
(SELECTION_KEYS 0) ; 0: "1234567890", 1: "asdfgjkl;"
(PAGE_KEYS 5) ; 1:<> 2:,. 4:(Rt)(Lt)
(QPHRASE_MODE 1) ; 1: shift, 2: ctrl, 4: alt
;
; This is only valid for "bimsphone*" IM name.
(AUTO_SELECTION YES)
(KEYMAP 0) ; 0: zozy, 1: et, 2: et26, 3: hsu
;
; This is only valid for "bimspinyin*" IM name.
(PINPHO_MAP "bims_pinyin")
;
; The following has effect only when AUTO_SELECTION is YES
(TSI_FNAME "tsi.db")
(YIN_FNAME "yin.db")
(SPACE_SELECTION NO)
(PHRASE_SELECTION YES)
(N_SELECTION_PHR 4)
;
; The following has effect only when AUTO_SELECTION is NO
(AUTO_UPCHAR YES)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; This is the global configuration of the zh_TW.Big5 locale
;
(define zh_TW.UTF-8
'((DEFAULT_IM "liu5new")
(DEFAULT_IM_MODULE "gen_inp")
(DEFAULT_IM_SINMD "DEFAULT")
(PHRASE "default.phr")
(CINPUT (jtcj_gb phonegb2 wubizixing bimspinyin bimsphone liu5new))
(FONTSET "-gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1")
(OVERSPOT_FONTSET "-gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1")))
;
; Here are detailed configuration of each IM (for zh_TW.Big5 locale).
;
(define jtcj_gb@utf-8
'((SETKEY 3)))
(define phonegb2@utf-8
'((SETKEY 4)
(END_KEY YES)
(BEEP_DUPCHAR YES)))
(define wubizixing@utf-8
'((SETKEY 5)))
(define bimspinyin@utf-8
'((SETKEY 6)
(MODULE "bimsphone")))
(define bimsphone@utf-8
'((SETKEY 7)
(MODULE "bimsphone")))
(define liu5new@utf-8
'((SETKEY 9)
(BEEP_DUPCHAR YES)))
----- End forwarded message -----
--
| This message was re-posted from debian-chinese-big5@lists.debian.org
| and converted from big5 to gb2312 by an automatic gateway.
Reply to: