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