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