1 ;;; enc-cn-tbl.lisp: CP936(GBK) <=> UCS-2 table
2 ;;; Chun Tian (binghe) <binghe.lisp@gmail.com>
3 ;;; Sat Dec 23 23:42:11 CST 2006
4 ;;; This table comes from:
5 ;;; http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP936.TXT
7 ;;; Cut first 274 lines of CP936.TXT, got a CP936-only.TXT and do shell commands:
8 ;;; $ cat CP936-only.TXT | awk -F "\t" '{printf(" (%s %s)\n",$1,$2);}' | sort | sed -e 's/0x/#x/g' > GBK2UCS.txt
9 ;;; $ cat CP936-only.TXT | awk -F "\t" '{printf(" (%s %s)\n",$2,$1);}' | sort | sed -e 's/0x/#x/g' > UCS2GBK.txt
10 ;;; and insert GBK2UCS.txt and UCS2GBK.txt to this file.
12 (in-package "SB!IMPL")
14 (define-multibyte-mapper *gbk-to-ucs-table*
15 '( ;; begin, insert GBK2UCS.TXT here (emacs: C-x i GBK2UCS.TXT)
21807 )) ;; end of *gbk-to-ucs-table*
21809 (define-multibyte-mapper *ucs-to-gbk-table*
21810 '( ;; begin, insert UCS2GBK.TXT here (emacs: C-x i UCS2GBK.TXT)
43602 )) ;; end of *ucs-to-gbk-table*