comparison lisp/international/utf-8-subst.el @ 47704:8a5233d2f072

Setup ucs-unicode-to-mule-cjk and ucs-mule-cjk-to-unicode, not utf-8-subst-table and utf-8-subst-rev-table.
author Kenichi Handa <handa@m17n.org>
date Mon, 30 Sep 2002 06:36:23 +0000
parents f59e00cee679
children 467a7f8b57f4
comparison
equal deleted inserted replaced
47703:6d4430dfeafc 47704:8a5233d2f072
1 ;;; utf-8-subst.el --- translation of untranslatable utf-8 to CJK -*-coding: iso-2022-7bit;-*- 1 ;;; utf-8-subst.el --- translation of undecodable UTF-8/16 to CJK -*-coding: iso-2022-7bit;-*-
2 2
3 ;; Copyright (C) 2001, 2002 Free Software Foundation, Inc. 3 ;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
4 4
5 ;; Author: Dave Love <fx@gnu.org> 5 ;; Author: Dave Love <fx@gnu.org>
6 ;; Keywords: i18n 6 ;; Keywords: i18n
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA. 23 ;; Boston, MA 02111-1307, USA.
24 24
25 ;;; Commentary: 25 ;;; Commentary:
26 26
27 ;; Defines hash table `utf-8-subst-table' which maps UTF-8 otherwise 27 ;; Defines hash table `ucs-unicode-to-mule-cjk' which maps UTF-8/16
28 ;; `untranslatable' characters to characters in specific Emacs CJK 28 ;; otherwise `undecodable' characters to characters in specific
29 ;; charsets. The CJK charsets used are chinese-gb2312, 29 ;; Emacs CJK charsets. Defines also the hash table
30 ;; japanese-jisx0208 and korean-ksc5601. Where their Unicodes 30 ;; `ucs-mule-cjk-to-unicode' that does the reverse mapping. The
31 ;; overlap, the priority used is J C K, guessing the likelihood of 31 ;; CJK charsets used are chinese-gb2312, japanese-jisx0208 and
32 ;; fonts being available generally. This can be altered by changing 32 ;; korean-ksc5601. Where their Unicodes overlap, the priority used is
33 ;; the order in which the table is filled. This should doubtless be 33 ;; J C K, guessing the likelihood of fonts being available generally.
34 ;; cusomizable somehow. 34 ;; This can be altered by changing the order in which the table is
35 ;; filled. This should doubtless be cusomizable somehow.
35 36
36 ;;; Code: 37 ;;; Code:
37 38
38 ;; korean-ksc5601 39 ;; korean-ksc5601
39 (mapc 40 (mapc
40 (lambda (pair) 41 (lambda (pair)
41 (puthash (car pair) (cadr pair) utf-8-subst-table) 42 (puthash (car pair) (cadr pair) ucs-unicode-to-mule-cjk)
42 (puthash (cadr pair) (car pair) utf-8-subst-rev-table)) 43 (puthash (cadr pair) (car pair) ucs-mule-cjk-to-unicode))
43 '((#x4E00 ?$(Cli(B) 44 '((#x4E00 ?$(Cli(B)
44 (#x4E01 ?$(CoK(B) 45 (#x4E01 ?$(CoK(B)
45 (#x4E03 ?$(CvR(B) 46 (#x4E03 ?$(CvR(B)
46 (#x4E07 ?$(CX2(B) 47 (#x4E07 ?$(CX2(B)
47 (#x4E08 ?$(Cm[(B) 48 (#x4E08 ?$(Cm[(B)
7012 (#xD79D ?$(CH~(B))) 7013 (#xD79D ?$(CH~(B)))
7013 7014
7014 ;; chinese-gb2312 7015 ;; chinese-gb2312
7015 (mapc 7016 (mapc
7016 (lambda (pair) 7017 (lambda (pair)
7017 (puthash (car pair) (cadr pair) utf-8-subst-table) 7018 (puthash (car pair) (cadr pair) ucs-unicode-to-mule-cjk)
7018 (puthash (cadr pair) (car pair) utf-8-subst-rev-table)) 7019 (puthash (cadr pair) (car pair) ucs-mule-cjk-to-unicode))
7019 '((#x4E00 ?$AR;(B) 7020 '((#x4E00 ?$AR;(B)
7020 (#x4E01 ?$A6!(B) 7021 (#x4E01 ?$A6!(B)
7021 (#x4E03 ?$AF_(B) 7022 (#x4E03 ?$AF_(B)
7022 (#x4E07 ?$AMr(B) 7023 (#x4E07 ?$AMr(B)
7023 (#x4E08 ?$AUI(B) 7024 (#x4E08 ?$AUI(B)
13782 )) 13783 ))
13783 13784
13784 ;; japanese-jisx0208 13785 ;; japanese-jisx0208
13785 (mapc 13786 (mapc
13786 (lambda (pair) 13787 (lambda (pair)
13787 (puthash (car pair) (cadr pair) utf-8-subst-table) 13788 (puthash (car pair) (cadr pair) ucs-unicode-to-mule-cjk)
13788 (puthash (cadr pair) (car pair) utf-8-subst-rev-table)) 13789 (puthash (cadr pair) (car pair) ucs-mule-cjk-to-unicode))
13789 '((#x4E00 ?$B0l(B) 13790 '((#x4E00 ?$B0l(B)
13790 (#x4E01 ?$BCz(B) 13791 (#x4E01 ?$BCz(B)
13791 (#x4E03 ?$B<7(B) 13792 (#x4E03 ?$B<7(B)
13792 (#x4E07 ?$BK|(B) 13793 (#x4E07 ?$BK|(B)
13793 (#x4E08 ?$B>f(B) 13794 (#x4E08 ?$B>f(B)