(chinese-isoir165): Specify iso-ir 165.
[chise/xemacs-chise.git] / lisp / mule / mule-conf.el
1 ;;; mule-conf.el --- configure multilingual environment
2
3 ;; Copyright (C) 1995,1999 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 1997,1999,2000,2002,2003 MORIOKA Tomohiko
6
7 ;; Keywords: mule, multilingual, character set, coding system
8
9 ;; This file is part of XEmacs.
10
11 ;; XEmacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; any later version.
15
16 ;; XEmacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 ;; GNU General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with XEmacs; see the file COPYING.  If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
25
26 ;;; Code:
27
28 ;; PinYin-ZhuYin
29 (make-charset 'sisheng "PinYin-ZhuYin"
30               '(registry "sisheng_cwnn\\|OMRON_UDC_ZH"
31                 dimension 1
32                 chars 94
33                 final ?0
34                 graphic 0
35                 ))
36
37 ;; Lao script.
38 ;; ISO10646's 0x0E80..0x0EDF are mapped to 0x20..0x7F.
39 (make-charset 'lao "Lao script"
40               '(registry "MuleLao-1"
41                 dimension 1
42                 chars 94
43                 final ?1
44                 graphic 1))
45
46 ;; IPA (International Phonetic Alphabet)
47 (make-charset 'ipa "International Phonetic Alphabet"
48               '(registry "MuleIPA"
49                 dimension 1
50                 chars 96
51                 final ?0
52                 graphic 1))
53
54 ;; Ethiopic
55 (make-charset 'ethiopic "Ethiopic"
56               '(registry "Ethio"
57                 dimension 2
58                 chars 94
59                 final ?3
60                 graphic 0
61                 ))
62
63 ;; ISO-IR-165 (CCITT Extended GB)
64 ;;    It is based on CCITT Recommendation T.101, includes GB 2312-80 +
65 ;;    GB 8565-88 table A4 + 293 characters.
66 (make-charset
67  'chinese-isoir165
68  "ISO-IR-165 (CCITT Extended GB; Chinese simplified)"
69  `(iso-ir 165
70    registry "isoir165"
71    dimension 2
72    chars 94
73    final ?E
74    graphic 0))
75
76 ;; CNS11643 Plane3 thru Plane7
77 ;; These represent more and more obscure Chinese characters.
78 ;; By the time you get to Plane 7, we're talking about characters
79 ;; that appear once in some ancient manuscript and whose meaning
80 ;; is unknown.
81
82 (flet
83     ((make-chinese-cns11643-charset
84       (name iso-ir plane final)
85       (make-charset
86        name (concat "CNS 11643 Plane " plane " (Chinese traditional)")
87        `(iso-ir ,iso-ir
88          registry 
89          ,(concat "CNS11643[.-]\\(.*[.-]\\)?" plane "$")
90          dimension 2
91          chars 94
92          final ,final
93          graphic 0))
94       ))
95   (make-chinese-cns11643-charset 'chinese-cns11643-3 183 "3" ?I)
96   (make-chinese-cns11643-charset 'chinese-cns11643-4 184 "4" ?J)
97   (make-chinese-cns11643-charset 'chinese-cns11643-5 185 "5" ?K)
98   (make-chinese-cns11643-charset 'chinese-cns11643-6 186 "6" ?L)
99   (make-chinese-cns11643-charset 'chinese-cns11643-7 187 "7" ?M)
100   )
101
102 ;; JIS X 0213:2000
103 (if (featurep 'utf-2000)
104     (progn
105       (make-charset
106        '=jis-x0213-1-2000
107        "JIS X 0213:2000 Plain 1"
108        '(iso-ir 228
109                 registry "jisx0213\\(\\.2000\\)-1"
110                 dimension 2
111                 chars 94
112                 mother =jis-x0208-1990
113                 final ?O
114                 graphic 0))
115       (make-charset
116        '=jis-x0213-2-2000
117        "JIS X 0213:2000 Plain 2"
118        '(iso-ir 229
119                 registry "jisx0213\\(\\.2000\\)-2"
120                 dimension 2
121                 chars 94
122                 final ?P
123                 graphic 0))
124       (define-charset-alias 'japanese-jisx0213-1 '=jis-x0213-1-2000)
125       (define-charset-alias 'japanese-jisx0213-2 '=jis-x0213-2-2000)
126       )
127   (make-charset
128    'japanese-jisx0213-1
129    "JIS X 0213:2000 Plain 1"
130    '(registry "jisx0213\\(\\.2000\\)-1"
131               dimension 2
132               chars 94
133               final ?O
134               graphic 0))
135   (make-charset
136    'japanese-jisx0213-2
137    "JIS X 0213:2000 Plain 2"
138    '(registry "jisx0213\\(\\.2000\\)-2"
139               dimension 2
140               chars 94
141               final ?P
142               graphic 0))
143   )
144
145 (when (featurep 'utf-2000)
146   (define-charset-alias 'ucs '=ucs)
147   (define-charset-alias 'japanese-jisx0208-1990 '=jis-x0208-1990)
148   (make-charset '=ucs@gb
149                 "UCS for GB"
150                 `(long-name     "ISO/IEC 10646 for GB"
151                   chars         256
152                   dimension     3
153                   columns       2
154                   graphic       2
155                   direction     l2r
156                   mother        =ucs))
157   (define-charset-alias 'ucs-gb '=ucs@gb)
158   (make-charset '=ucs@cns
159                 "UCS for CNS"
160                 `(long-name     "ISO/IEC 10646 for CNS 11643"
161                   chars         256
162                   dimension     3
163                   columns       2
164                   graphic       2
165                   direction     l2r
166                   mother        =ucs))
167   (define-charset-alias 'ucs-cns '=ucs@cns)
168   (make-charset '=ucs@jis
169                 "UCS for JIS"
170                 `(long-name     "ISO/IEC 10646 for JIS X0208/0212/0213"
171                   chars         256
172                   dimension     3
173                   columns       2
174                   graphic       2
175                   direction     l2r
176                   mother        =ucs))
177   (define-charset-alias 'ucs-jis '=ucs@jis)
178   (make-charset '=ucs@jis-1990
179                 "UCS for JIS:1990"
180                 `(long-name     "ISO/IEC 10646 for JIS X 0208/0212:1990"
181                   chars         256
182                   dimension     3
183                   columns       2
184                   graphic       2
185                   direction     l2r
186                   mother        ucs-jis))
187   (define-charset-alias '=ucs-jis-1990 '=ucs@jis-1990)
188   (make-charset '=ucs@jis-2000
189                 "UCS for JIS:2000"
190                 `(long-name     "ISO/IEC 10646 for JIS X 0213:2000"
191                   chars         256
192                   dimension     3
193                   columns       2
194                   graphic       2
195                   direction     l2r
196                   mother        ucs-jis))
197   (define-charset-alias '=ucs-jis-2000 '=ucs@jis-2000)
198   (make-charset '=ucs@ks
199                 "UCS for KS"
200                 `(long-name     "ISO/IEC 10646 for Korean Standards"
201                   chars         256
202                   dimension     3
203                   columns       2
204                   graphic       2
205                   direction     l2r
206                   mother        =ucs))
207   (define-charset-alias 'ucs-ks '=ucs@ks)
208   (make-charset '=ucs@big5
209                 "UCS for Big5"
210                 `(long-name     "ISO/IEC 10646 for Big5"
211                   chars         256
212                   dimension     3
213                   columns       2
214                   graphic       2
215                   direction     l2r
216                   mother        =ucs))
217   (define-charset-alias 'ucs-big5 '=ucs@big5)
218
219   (make-charset 'ideograph-daikanwa
220                 "Daikanwa"
221                 `(long-name     "Daikanwa dictionary (revised version 2)"
222                   chars         256
223                   dimension     2
224                   columns       2
225                   graphic       2
226                   direction     l2r
227                   registry      "Daikanwa\\(\\.[0-9]+\\)?-3"
228                   min-code      #xE00000
229                   max-code      ,(+ #xE00000 50100)
230                   code-offset   #xE00000))
231
232   (make-charset '=daikanwa-rev1
233                 "Daikanwa Rev."
234                 `(long-name     "Daikanwa dictionary (revised version)"
235                   chars         256
236                   dimension     2
237                   columns       2
238                   graphic       2
239                   direction     l2r
240                   registry      "Daikanwa\\(\\.[0-9]+\\)?-2"))
241   (define-charset-alias 'ideograph-daikanwa-2 '=daikanwa-rev1)
242
243   (make-charset '=daikanwa-rev2
244                 "Daikanwa"
245                 `(long-name     "Daikanwa dictionary (revised version 2)"
246                   chars         256
247                   dimension     2
248                   columns       2
249                   graphic       2
250                   direction     l2r
251                   registry      "Daikanwa\\(\\.[0-9]+\\)?-3"
252                   min-code      #xE00000
253                   max-code      ,(+ #xE00000 50100)
254                   code-offset   #xE00000))
255
256   (make-charset '=big5-pua
257                 "Big5-PUA"
258                 `(long-name     "Big5 with private used area"
259                   chars         256
260                   dimension     2
261                   columns       2
262                   graphic       2
263                   direction     l2r
264                   mother        chinese-big5
265                   registry      "Big5\\.ETEN"))
266   (define-charset-alias 'chinese-big5-pua '=big5-pua)
267   (make-charset '=big5-eten
268                 "Big5-ETEN"
269                 `(long-name     "Big5 ETEN"
270                   chars         256
271                   dimension     2
272                   columns       2
273                   graphic       2
274                   direction     l2r
275                   mother        chinese-big5
276                   min-code      #x8140
277                   max-code      #xFEFE
278                   registry      "Big5\\.ETEN"))
279   (define-charset-alias 'chinese-big5-eten '=big5-eten)
280   (make-charset 'chinese-big5-eten-a
281                 "Big5-ETEN-a"
282                 `(long-name     "Big5 ETEN (#xF9D6 .. #xF9FE)"
283                   chars         256
284                   dimension     2
285                   columns       2
286                   graphic       2
287                   direction     l2r
288                   mother        chinese-big5
289                   min-code      #xF9D6
290                   max-code      #xF9FE
291                   registry      "Big5\\.ETEN"))
292   (make-charset 'chinese-big5-eten-b
293                 "Big5-ETEN-b"
294                 `(long-name     "Big5 ETEN (#xC6A1 .. #xC8FE)"
295                   chars         256
296                   dimension     2
297                   columns       2
298                   graphic       2
299                   direction     l2r
300                   mother        chinese-big5
301                   min-code      #xC6A1
302                   max-code      #xC8FE
303                   registry      "Big5\\.ETEN"))
304   (make-charset '=big5-cdp
305                 "Big5-CDP"
306                 `(long-name     "Big5 with CDP extension"
307                   chars         256
308                   dimension     2
309                   columns       2
310                   graphic       2
311                   direction     l2r
312                   registry      "big5\\.cdp-0"
313                   mother        chinese-big5
314                   min-code      #x8140
315                   max-code      #x8DFE))
316   (define-charset-alias 'chinese-big5-cdp '=big5-cdp)
317   (let* ((i 1)
318          (hzk-min (+ (lsh #x6200 16) 65536))
319          (hzk-max (+ hzk-min 65535)))
320     (while (<= i 12)
321       (make-charset
322        (intern (format "=hanziku-%d" i))
323        (format "HANZIKU-%d" i)
324        `(long-name ,(format "HANZIKU (pseudo BIG5 encoding) part %d" i)
325                    chars 256
326                    dimension 2
327                    columns 2
328                    graphic 2
329                    direction l2r
330                    registry ,(format "hanziku-%d$" i i)
331                    min-code ,hzk-min
332                    max-code ,hzk-max
333                    code-offset ,hzk-min))
334       (define-charset-alias
335         (intern (format "ideograph-hanziku-%d" i))
336         (intern (format "=hanziku-%d" i)))
337       (setq hzk-min (1+ hzk-max)
338             hzk-max (+ hzk-min 65535))
339       (setq i (1+ i))))
340
341   (make-charset '=gt
342                 "GT"
343                 `(long-name     "GT 2000"
344                   chars         256
345                   dimension     3
346                   columns       2
347                   graphic       2
348                   direction     l2r
349                   registry      ""
350                   min-code      ,(lsh #x6100 16)
351                   max-code      ,(+ (lsh #x6100 16) 67547)
352                   code-offset   ,(lsh #x6100 16)))
353   (define-charset-alias 'ideograph-gt '=gt)
354   (make-charset '=gt-k
355                 "GT parts"
356                 `(long-name     "Ideographic parts of GT"
357                   chars         256
358                   dimension     2
359                   columns       2
360                   graphic       2
361                   direction     l2r
362                   registry      ""
363                   min-code      ,(lsh #x6110 16)
364                   max-code      ,(+ (lsh #x6110 16) 17090)
365                   code-offset   ,(lsh #x6110 16)))
366   (define-charset-alias 'ideograph-gt-k '=gt-k)
367   (let ((i 1))
368     (while (<= i 11)
369       (make-charset
370        (intern (format "=gt-pj-%d" i))
371        (format "GT PJ %d" i)
372        `(long-name ,(format "GT 2000 (pseudo JIS encoding) part %d" i)
373                    chars 94
374                    dimension 2
375                    columns 2
376                    graphic 0
377                    direction l2r
378                    registry ,(format "\\(GTpj-%d\\|jisx0208\\.GT-%d\\)$" i i)))
379       (define-charset-alias
380         (intern (format "ideograph-gt-pj-%d" i))
381         (intern (format "=gt-pj-%d" i)))
382       (setq i (1+ i))))
383   (make-charset
384    '=gt-pj-k1
385    "GT K1"
386    `(long-name "Ideographic parts of GT (pseudo JIS encoding) part 1"
387                chars 94
388                dimension 2
389                columns 2
390                graphic 0
391                direction l2r
392                registry "\\(GTKpj-1\\|jisx0208\\.GTK-1\\)$"))
393   (define-charset-alias 'ideograph-gt-pj-k1 '=gt-pj-k1)
394   (make-charset
395    '=gt-pj-k2
396    "GT K2"
397    `(long-name "Ideographic parts of GT (pseudo JIS encoding) part 2"
398                chars 94
399                dimension 2
400                columns 2
401                graphic 0
402                direction l2r
403                registry "\\(GTKpj-2\\|jisx0208\\.GTK-2\\)$"))
404   (define-charset-alias 'ideograph-gt-pj-k2 '=gt-pj-k2)
405   (make-charset '=cbeta "CBETA PUA"
406                 '(long-name     "CBETA private characters"
407                   chars         256
408                   dimension     2
409                   registry      "cbeta-0"
410                   graphic       2
411                   min-code      #xE20000
412                   max-code      #xE2FFFF
413                   code-offset   #xE20000
414                   columns       2
415                   direction     l2r))
416   (define-charset-alias 'ideograph-cbeta '=cbeta)
417   (make-charset '=jef-china3
418                 "JEF + CHINA3"
419                 `(long-name     "JEF + CHINA3 private characters"
420                   chars         256
421                   dimension     2
422                   columns       2
423                   graphic       2
424                   direction     l2r
425                   registry      "china3jef-0"
426                   min-code      #xE80000
427                   max-code      #xE8FFFF
428                   code-offset   #xE80000))
429   (define-charset-alias 'china3-jef '=jef-china3)
430   )
431
432 ;;; mule-conf.el ends here