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