(=cns11643-3): Renamed from `chinese-cns11643-2'.
[chise/xemacs-chise.git.1] / 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 '=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   (define-charset-alias 'chinese-cns11643-3     '=cns11643-3)
111   )
112
113 ;; JIS X 0213:2000
114 (if (featurep 'utf-2000)
115     (progn
116       (make-charset
117        '=jis-x0213-1-2000
118        "JIS X 0213:2000 Plain 1"
119        '(iso-ir 228
120                 registry "jisx0213\\(\\.2000\\)-1"
121                 dimension 2
122                 chars 94
123                 mother =jis-x0208-1990
124                 final ?O
125                 graphic 0))
126       (make-charset
127        '=jis-x0213-2-2000
128        "JIS X 0213:2000 Plain 2"
129        '(iso-ir 229
130                 registry "jisx0213\\(\\.2000\\)-2"
131                 dimension 2
132                 chars 94
133                 final ?P
134                 graphic 0))
135       (define-charset-alias 'japanese-jisx0213-1 '=jis-x0213-1-2000)
136       (define-charset-alias 'japanese-jisx0213-2 '=jis-x0213-2-2000)
137       )
138   (make-charset
139    'japanese-jisx0213-1
140    "JIS X 0213:2000 Plain 1"
141    '(registry "jisx0213\\(\\.2000\\)-1"
142               dimension 2
143               chars 94
144               final ?O
145               graphic 0))
146   (make-charset
147    'japanese-jisx0213-2
148    "JIS X 0213:2000 Plain 2"
149    '(registry "jisx0213\\(\\.2000\\)-2"
150               dimension 2
151               chars 94
152               final ?P
153               graphic 0))
154   )
155
156 (when (featurep 'utf-2000)
157   (define-charset-alias 'ucs '=ucs)
158   (define-charset-alias 'japanese-jisx0208-1990 '=jis-x0208-1990)
159   (make-charset '=ucs@gb
160                 "UCS for GB"
161                 `(long-name     "ISO/IEC 10646 for GB"
162                   chars         256
163                   dimension     3
164                   columns       2
165                   graphic       2
166                   direction     l2r
167                   mother        =ucs))
168   (define-charset-alias 'ucs-gb '=ucs@gb)
169   (make-charset '=ucs@cns
170                 "UCS for CNS"
171                 `(long-name     "ISO/IEC 10646 for CNS 11643"
172                   chars         256
173                   dimension     3
174                   columns       2
175                   graphic       2
176                   direction     l2r
177                   mother        =ucs))
178   (define-charset-alias 'ucs-cns '=ucs@cns)
179   (make-charset '=ucs@jis
180                 "UCS for JIS"
181                 `(long-name     "ISO/IEC 10646 for JIS X0208/0212/0213"
182                   chars         256
183                   dimension     3
184                   columns       2
185                   graphic       2
186                   direction     l2r
187                   mother        =ucs))
188   (define-charset-alias 'ucs-jis '=ucs@jis)
189   (make-charset '=ucs@jis-1990
190                 "UCS for JIS:1990"
191                 `(long-name     "ISO/IEC 10646 for JIS X 0208/0212:1990"
192                   chars         256
193                   dimension     3
194                   columns       2
195                   graphic       2
196                   direction     l2r
197                   mother        ucs-jis))
198   (define-charset-alias '=ucs-jis-1990 '=ucs@jis-1990)
199   (make-charset '=ucs@jis-2000
200                 "UCS for JIS:2000"
201                 `(long-name     "ISO/IEC 10646 for JIS X 0213:2000"
202                   chars         256
203                   dimension     3
204                   columns       2
205                   graphic       2
206                   direction     l2r
207                   mother        ucs-jis))
208   (define-charset-alias '=ucs-jis-2000 '=ucs@jis-2000)
209   (make-charset '=ucs@ks
210                 "UCS for KS"
211                 `(long-name     "ISO/IEC 10646 for Korean Standards"
212                   chars         256
213                   dimension     3
214                   columns       2
215                   graphic       2
216                   direction     l2r
217                   mother        =ucs))
218   (define-charset-alias 'ucs-ks '=ucs@ks)
219   (make-charset '=ucs@big5
220                 "UCS for Big5"
221                 `(long-name     "ISO/IEC 10646 for Big5"
222                   chars         256
223                   dimension     3
224                   columns       2
225                   graphic       2
226                   direction     l2r
227                   mother        =ucs))
228   (define-charset-alias 'ucs-big5 '=ucs@big5)
229
230   (make-charset 'ideograph-daikanwa
231                 "Daikanwa"
232                 `(long-name     "Daikanwa dictionary (revised version 2)"
233                   chars         256
234                   dimension     2
235                   columns       2
236                   graphic       2
237                   direction     l2r
238                   registry      "Daikanwa\\(\\.[0-9]+\\)?-3"
239                   min-code      #xE00000
240                   max-code      ,(+ #xE00000 50100)
241                   code-offset   #xE00000))
242
243   (make-charset '=daikanwa-rev1
244                 "Daikanwa Rev."
245                 `(long-name     "Daikanwa dictionary (revised version)"
246                   chars         256
247                   dimension     2
248                   columns       2
249                   graphic       2
250                   direction     l2r
251                   registry      "Daikanwa\\(\\.[0-9]+\\)?-2"))
252   (define-charset-alias 'ideograph-daikanwa-2 '=daikanwa-rev1)
253
254   (make-charset '=daikanwa-rev2
255                 "Daikanwa"
256                 `(long-name     "Daikanwa dictionary (revised version 2)"
257                   chars         256
258                   dimension     2
259                   columns       2
260                   graphic       2
261                   direction     l2r
262                   registry      "Daikanwa\\(\\.[0-9]+\\)?-3"
263                   min-code      #xE00000
264                   max-code      ,(+ #xE00000 50100)
265                   code-offset   #xE00000))
266
267   (make-charset '=big5-pua
268                 "Big5-PUA"
269                 `(long-name     "Big5 with private used area"
270                   chars         256
271                   dimension     2
272                   columns       2
273                   graphic       2
274                   direction     l2r
275                   mother        chinese-big5
276                   registry      "Big5\\.ETEN"))
277   (define-charset-alias 'chinese-big5-pua '=big5-pua)
278   (make-charset '=big5-eten
279                 "Big5-ETEN"
280                 `(long-name     "Big5 ETEN"
281                   chars         256
282                   dimension     2
283                   columns       2
284                   graphic       2
285                   direction     l2r
286                   mother        chinese-big5
287                   min-code      #x8140
288                   max-code      #xFEFE
289                   registry      "Big5\\.ETEN"))
290   (define-charset-alias 'chinese-big5-eten '=big5-eten)
291   (make-charset 'chinese-big5-eten-a
292                 "Big5-ETEN-a"
293                 `(long-name     "Big5 ETEN (#xF9D6 .. #xF9FE)"
294                   chars         256
295                   dimension     2
296                   columns       2
297                   graphic       2
298                   direction     l2r
299                   mother        chinese-big5
300                   min-code      #xF9D6
301                   max-code      #xF9FE
302                   registry      "Big5\\.ETEN"))
303   (make-charset 'chinese-big5-eten-b
304                 "Big5-ETEN-b"
305                 `(long-name     "Big5 ETEN (#xC6A1 .. #xC8FE)"
306                   chars         256
307                   dimension     2
308                   columns       2
309                   graphic       2
310                   direction     l2r
311                   mother        chinese-big5
312                   min-code      #xC6A1
313                   max-code      #xC8FE
314                   registry      "Big5\\.ETEN"))
315   (make-charset '=big5-cdp
316                 "Big5-CDP"
317                 `(long-name     "Big5 with CDP extension"
318                   chars         256
319                   dimension     2
320                   columns       2
321                   graphic       2
322                   direction     l2r
323                   registry      "big5\\.cdp-0"
324                   mother        chinese-big5
325                   min-code      #x8140
326                   max-code      #x8DFE))
327   (define-charset-alias 'chinese-big5-cdp '=big5-cdp)
328   (let* ((i 1)
329          (hzk-min (+ (lsh #x6200 16) 65536))
330          (hzk-max (+ hzk-min 65535)))
331     (while (<= i 12)
332       (make-charset
333        (intern (format "=hanziku-%d" i))
334        (format "HANZIKU-%d" i)
335        `(long-name ,(format "HANZIKU (pseudo BIG5 encoding) part %d" i)
336                    chars 256
337                    dimension 2
338                    columns 2
339                    graphic 2
340                    direction l2r
341                    registry ,(format "hanziku-%d$" i i)
342                    min-code ,hzk-min
343                    max-code ,hzk-max
344                    code-offset ,hzk-min))
345       (define-charset-alias
346         (intern (format "ideograph-hanziku-%d" i))
347         (intern (format "=hanziku-%d" i)))
348       (setq hzk-min (1+ hzk-max)
349             hzk-max (+ hzk-min 65535))
350       (setq i (1+ i))))
351
352   (make-charset '=gt
353                 "GT"
354                 `(long-name     "GT 2000"
355                   chars         256
356                   dimension     3
357                   columns       2
358                   graphic       2
359                   direction     l2r
360                   registry      ""
361                   min-code      ,(lsh #x6100 16)
362                   max-code      ,(+ (lsh #x6100 16) 67547)
363                   code-offset   ,(lsh #x6100 16)))
364   (define-charset-alias 'ideograph-gt '=gt)
365   (make-charset '=gt-k
366                 "GT parts"
367                 `(long-name     "Ideographic parts of GT"
368                   chars         256
369                   dimension     2
370                   columns       2
371                   graphic       2
372                   direction     l2r
373                   registry      ""
374                   min-code      ,(lsh #x6110 16)
375                   max-code      ,(+ (lsh #x6110 16) 17090)
376                   code-offset   ,(lsh #x6110 16)))
377   (define-charset-alias 'ideograph-gt-k '=gt-k)
378   (let ((i 1))
379     (while (<= i 11)
380       (make-charset
381        (intern (format "=gt-pj-%d" i))
382        (format "GT PJ %d" i)
383        `(long-name ,(format "GT 2000 (pseudo JIS encoding) part %d" i)
384                    chars 94
385                    dimension 2
386                    columns 2
387                    graphic 0
388                    direction l2r
389                    registry ,(format "\\(GTpj-%d\\|jisx0208\\.GT-%d\\)$" i i)))
390       (define-charset-alias
391         (intern (format "ideograph-gt-pj-%d" i))
392         (intern (format "=gt-pj-%d" i)))
393       (setq i (1+ i))))
394   (make-charset
395    '=gt-pj-k1
396    "GT K1"
397    `(long-name "Ideographic parts of GT (pseudo JIS encoding) part 1"
398                chars 94
399                dimension 2
400                columns 2
401                graphic 0
402                direction l2r
403                registry "\\(GTKpj-1\\|jisx0208\\.GTK-1\\)$"))
404   (define-charset-alias 'ideograph-gt-pj-k1 '=gt-pj-k1)
405   (make-charset
406    '=gt-pj-k2
407    "GT K2"
408    `(long-name "Ideographic parts of GT (pseudo JIS encoding) part 2"
409                chars 94
410                dimension 2
411                columns 2
412                graphic 0
413                direction l2r
414                registry "\\(GTKpj-2\\|jisx0208\\.GTK-2\\)$"))
415   (define-charset-alias 'ideograph-gt-pj-k2 '=gt-pj-k2)
416   (make-charset '=cbeta "CBETA PUA"
417                 '(long-name     "CBETA private characters"
418                   chars         256
419                   dimension     2
420                   registry      "cbeta-0"
421                   graphic       2
422                   min-code      #xE20000
423                   max-code      #xE2FFFF
424                   code-offset   #xE20000
425                   columns       2
426                   direction     l2r))
427   (define-charset-alias 'ideograph-cbeta '=cbeta)
428   (make-charset '=jef-china3
429                 "JEF + CHINA3"
430                 `(long-name     "JEF + CHINA3 private characters"
431                   chars         256
432                   dimension     2
433                   columns       2
434                   graphic       2
435                   direction     l2r
436                   registry      "china3jef-0"
437                   min-code      #xE80000
438                   max-code      #xE8FFFF
439                   code-offset   #xE80000))
440   (define-charset-alias 'china3-jef '=jef-china3)
441   )
442
443 ;;; mule-conf.el ends here