[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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 -----



Reply to: