comparison lisp/language/japan-util.el @ 105971:6b2352662a3f

Make sure that the value of jisx0208 property is jisx0208 character.
author Kenichi Handa <handa@m17n.org>
date Fri, 13 Nov 2009 06:20:52 +0000
parents df4934f25eef
children 1d1d5d9bd884
comparison
equal deleted inserted replaced
105970:f6c1ac558c84 105971:6b2352662a3f
107 (?+ ?+) (?− ?-) (?= ?=) (?< ?<) (?> ?>) 107 (?+ ?+) (?− ?-) (?= ?=) (?< ?<) (?> ?>)
108 (?′ ?') (?″ ?\") (?¥ ?\\) (?$ ?$) (?% ?%) (?# ?#) (?& ?&) (?* ?*) 108 (?′ ?') (?″ ?\") (?¥ ?\\) (?$ ?$) (?% ?%) (?# ?#) (?& ?&) (?* ?*)
109 (?@ ?@) 109 (?@ ?@)
110 ;; cp932-2-byte 110 ;; cp932-2-byte
111 (#x2015 ?-) (#xFF5E ?~) (#xFF0D ?-)) 111 (#x2015 ?-) (#xFF5E ?~) (#xFF0D ?-))
112 "Japanese JISX0208 symbol character table. 112 "Japanese JISX0208 and CP932 symbol character table.
113 Each element is of the form (SYMBOL ASCII HANKAKU), where SYMBOL 113 Each element is of the form (SYMBOL ASCII HANKAKU), where SYMBOL
114 belongs to `japanese-jisx0208', ASCII belongs to `ascii', and HANKAKU 114 belongs to `japanese-jisx0208' or `cp932', ASCII belongs to `ascii',
115 belongs to `japanese-jisx0201-kana'.") 115 and HANKAKU belongs to `japanese-jisx0201-kana'.")
116 116
117 ;; Put properties 'jisx0208, 'jisx0201, and 'ascii to each Japanese 117 ;; Put properties 'jisx0208, 'jisx0201, and 'ascii to each Japanese
118 ;; symbol and ASCII characters for conversion among them. 118 ;; symbol and ASCII characters for conversion among them.
119 (let ((l japanese-symbol-table) 119 (let ((l japanese-symbol-table)
120 slot jisx0208 ascii jisx0201) 120 slot jisx0208 ascii jisx0201)
123 jisx0208 (car slot) ascii (nth 1 slot) jisx0201 (nth 2 slot) 123 jisx0208 (car slot) ascii (nth 1 slot) jisx0201 (nth 2 slot)
124 l (cdr l)) 124 l (cdr l))
125 (if ascii 125 (if ascii
126 (progn 126 (progn
127 (put-char-code-property jisx0208 'ascii ascii) 127 (put-char-code-property jisx0208 'ascii ascii)
128 (put-char-code-property ascii 'jisx0208 jisx0208))) 128 (if (encode-char jisx0208 'japanese-jisx0208)
129 (put-char-code-property ascii 'jisx0208 jisx0208))))
129 (if jisx0201 130 (if jisx0201
130 (progn 131 (progn
131 (put-char-code-property jisx0208 'jisx0201 jisx0201) 132 (put-char-code-property jisx0208 'jisx0201 jisx0201)
132 (put-char-code-property jisx0201 'jisx0208 jisx0208))))) 133 (if (encode-char jisx0208 'japanese-jisx0208)
134 (put-char-code-property jisx0201 'jisx0208 jisx0208))))))
133 135
134 (defconst japanese-alpha-numeric-table 136 (defconst japanese-alpha-numeric-table
135 '((?0 . ?0) (?1 . ?1) (?2 . ?2) (?3 . ?3) (?4 . ?4) 137 '((?0 . ?0) (?1 . ?1) (?2 . ?2) (?3 . ?3) (?4 . ?4)
136 (?5 . ?5) (?6 . ?6) (?7 . ?7) (?8 . ?8) (?9 . ?9) 138 (?5 . ?5) (?6 . ?6) (?7 . ?7) (?8 . ?8) (?9 . ?9)
137 (?A . ?A) (?B . ?B) (?C . ?C) (?D . ?D) (?E . ?E) 139 (?A . ?A) (?B . ?B) (?C . ?C) (?D . ?D) (?E . ?E)