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