(=jis-x0208-1978): Define as an alias for `=jis-x0208@1978'.
[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,2004 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 '=jis-x0208-1978          '=jis-x0208@1978)
29 (define-charset-alias 'japanese-jisx0208-1978   '=jis-x0208@1978)
30 (define-charset-alias 'chinese-gb2312           '=gb2312)
31 (define-charset-alias '=jis-x0208-1983          '=jis-x0208@1983)
32 (define-charset-alias 'japanese-jisx0208        '=jis-x0208@1983)
33 (define-charset-alias 'korean-ksc5601           '=ks-x1001)
34 (define-charset-alias 'japanese-jisx0212        '=jis-x0212)
35 (define-charset-alias 'chinese-cns11643-1       '=cns11643-1)
36 (define-charset-alias 'chinese-cns11643-2       '=cns11643-2)
37 (define-charset-alias 'chinese-gb12345          '=gb12345)
38 (define-charset-alias 'chinese-big5             '=big5)
39
40 ;; PinYin-ZhuYin
41 (make-charset 'sisheng "PinYin-ZhuYin"
42               '(registry "sisheng_cwnn\\|OMRON_UDC_ZH"
43                 dimension 1
44                 chars 94
45                 final ?0
46                 graphic 0
47                 ))
48
49 ;; Lao script.
50 ;; ISO10646's 0x0E80..0x0EDF are mapped to 0x20..0x7F.
51 (make-charset 'lao "Lao script"
52               '(registry "MuleLao-1"
53                 dimension 1
54                 chars 94
55                 final ?1
56                 graphic 1))
57
58 ;; IPA (International Phonetic Alphabet)
59 (make-charset 'ipa "International Phonetic Alphabet"
60               '(registry "MuleIPA"
61                 dimension 1
62                 chars 96
63                 final ?0
64                 graphic 1))
65
66 ;; Ethiopic
67 (make-charset 'ethiopic "Ethiopic"
68               '(registry "Ethio"
69                 dimension 2
70                 chars 94
71                 final ?3
72                 graphic 0
73                 ))
74
75 ;; ISO-IR-165 (CCITT Extended GB)
76 ;;    It is based on CCITT Recommendation T.101, includes GB 2312-80 +
77 ;;    GB 8565-88 table A4 + 293 characters.
78 (if (featurep 'utf-2000)
79     (progn
80       (make-charset '=iso-ir165
81                     "ISO-IR-165 (CCITT Extended GB; Chinese simplified)"
82                     '(iso-ir 165
83                              dimension 2
84                              chars 94
85                              mother =gb2312
86                              final ?E
87                              registry "isoir165"
88                              graphic 0))
89       (define-charset-alias 'chinese-isoir165 '=iso-ir165))
90   (make-charset 'chinese-isoir165
91                 "ISO-IR-165 (CCITT Extended GB; Chinese simplified)"
92                 '(iso-ir 165
93                          dimension 2
94                          chars 94
95                          final ?E
96                          registry "isoir165"
97                          graphic 0)))
98
99 ;; CNS11643 Plane3 thru Plane7
100 ;; These represent more and more obscure Chinese characters.
101 ;; By the time you get to Plane 7, we're talking about characters
102 ;; that appear once in some ancient manuscript and whose meaning
103 ;; is unknown.
104
105 (flet
106     ((make-chinese-cns11643-charset
107       (name iso-ir plane final)
108       (make-charset
109        name (concat "CNS 11643 Plane " plane " (Chinese traditional)")
110        `(iso-ir ,iso-ir
111          registry 
112          ,(concat "CNS11643[.-]\\(.*[.-]\\)?" plane "$")
113          dimension 2
114          chars 94
115          final ,final
116          graphic 0))
117       ))
118   (make-chinese-cns11643-charset '=cns11643-3 183 "3" ?I)
119   (make-chinese-cns11643-charset '=cns11643-4 184 "4" ?J)
120   (make-chinese-cns11643-charset '=cns11643-5 185 "5" ?K)
121   (make-chinese-cns11643-charset '=cns11643-6 186 "6" ?L)
122   (make-chinese-cns11643-charset '=cns11643-7 187 "7" ?M)
123   (define-charset-alias 'chinese-cns11643-3     '=cns11643-3)
124   (define-charset-alias 'chinese-cns11643-4     '=cns11643-4)
125   (define-charset-alias 'chinese-cns11643-5     '=cns11643-5)
126   (define-charset-alias 'chinese-cns11643-6     '=cns11643-6)
127   (define-charset-alias 'chinese-cns11643-7     '=cns11643-7)
128   )
129
130 ;; JIS X 0213:2000
131 (if (featurep 'utf-2000)
132     (progn
133       (make-charset
134        '=jis-x0213-1-2000
135        "JIS X 0213:2000 Plain 1"
136        '(iso-ir 228
137                 registry "jisx0213\\(\\.2000\\)-1"
138                 dimension 2
139                 chars 94
140                 mother =jis-x0208@1990
141                 final ?O
142                 graphic 0))
143       (make-charset
144        '=jis-x0213-2-2000
145        "JIS X 0213:2000 Plain 2"
146        '(iso-ir 229
147                 registry "jisx0213\\(\\.2000\\)-2"
148                 dimension 2
149                 chars 94
150                 final ?P
151                 graphic 0))
152       (define-charset-alias 'japanese-jisx0213-1 '=jis-x0213-1-2000)
153       (define-charset-alias 'japanese-jisx0213-2 '=jis-x0213-2-2000)
154       )
155   (make-charset
156    'japanese-jisx0213-1
157    "JIS X 0213:2000 Plain 1"
158    '(registry "jisx0213\\(\\.2000\\)-1"
159               dimension 2
160               chars 94
161               final ?O
162               graphic 0))
163   (make-charset
164    'japanese-jisx0213-2
165    "JIS X 0213:2000 Plain 2"
166    '(registry "jisx0213\\(\\.2000\\)-2"
167               dimension 2
168               chars 94
169               final ?P
170               graphic 0))
171   )
172
173 (when (featurep 'utf-2000)
174   (define-charset-alias 'ucs '=ucs)
175   (define-charset-alias '=jis-x0208-1990 '=jis-x0208@1990)
176   (define-charset-alias 'japanese-jisx0208-1990 '=jis-x0208@1990)
177
178   (make-charset '=big5-cdp
179                 "Big5 with CDP extension"
180                 '(long-name     "Big5-CDP"
181                   chars         256
182                   dimension     2
183                   columns       2
184                   graphic       2
185                   direction     l2r
186                   registry      "big5\\.cdp-0"
187                   mother        chinese-big5
188                   min-code      #x8140
189                   max-code      #x8DFE))
190   (define-charset-alias 'chinese-big5-cdp '=big5-cdp)
191
192   (make-charset '=gt
193                 "GT 2000"
194                 `(long-name     "GT"
195                   chars         256
196                   dimension     3
197                   columns       2
198                   graphic       2
199                   direction     l2r
200                   registry      ""
201                   min-code      ,(lsh #x6100 16)
202                   max-code      ,(+ (lsh #x6100 16) 67547)
203                   code-offset   ,(lsh #x6100 16)))
204   (define-charset-alias 'ideograph-gt '=gt)
205   (make-charset '=gt-k
206                 "Ideographic components of GT"
207                 `(long-name     "GT components"
208                   chars         256
209                   dimension     2
210                   columns       2
211                   graphic       2
212                   direction     l2r
213                   registry      ""
214                   min-code      ,(lsh #x6110 16)
215                   max-code      ,(+ (lsh #x6110 16) 17090)
216                   code-offset   ,(lsh #x6110 16)))
217   (define-charset-alias 'ideograph-gt-k '=gt-k)
218   (let ((i 1))
219     (while (<= i 11)
220       (make-charset
221        (intern (format "=gt-pj-%d" i))
222        (format "GT 2000 (pseudo JIS encoding) part %d" i)
223        `(long-name ,(format "GT PJ %d" i)
224                    chars 94
225                    dimension 2
226                    columns 2
227                    graphic 0
228                    direction l2r
229                    registry ,(format "\\(GTpj-%d\\|jisx0208\\.GT-%d\\)$" i i)))
230       (define-charset-alias
231         (intern (format "ideograph-gt-pj-%d" i))
232         (intern (format "=gt-pj-%d" i)))
233       (setq i (1+ i))))
234   (make-charset
235    '=gt-pj-k1
236    "Ideographic parts of GT (pseudo JIS encoding) part 1"
237    '(long-name "GT K1"
238                chars 94
239                dimension 2
240                columns 2
241                graphic 0
242                direction l2r
243                registry "\\(GTKpj-1\\|jisx0208\\.GTK-1\\)$"))
244   (define-charset-alias 'ideograph-gt-pj-k1 '=gt-pj-k1)
245   (make-charset
246    '=gt-pj-k2
247    "Ideographic parts of GT (pseudo JIS encoding) part 2"
248    '(long-name "GT K2"
249                chars 94
250                dimension 2
251                columns 2
252                graphic 0
253                direction l2r
254                registry "\\(GTKpj-2\\|jisx0208\\.GTK-2\\)$"))
255   (define-charset-alias 'ideograph-gt-pj-k2 '=gt-pj-k2)
256
257   (make-charset '=daikanwa
258                 "Daikanwa dictionary (revised version 2)"
259                 `(long-name     "Daikanwa"
260                   chars         256
261                   dimension     2
262                   columns       2
263                   graphic       2
264                   direction     l2r
265                   registry      "Daikanwa\\(\\.[0-9]+\\)?-3"
266                   min-code      #xE00000
267                   max-code      ,(+ #xE00000 50100)
268                   code-offset   #xE00000))
269   (define-charset-alias 'ideograph-daikanwa '=daikanwa)
270
271   (make-charset '=daikanwa@rev1
272                 "Daikanwa dictionary (revised version)"
273                 `(long-name     "Daikanwa Rev."
274                   chars         256
275                   dimension     2
276                   columns       2
277                   graphic       2
278                   direction     l2r
279                   registry      "Daikanwa\\(\\.[0-9]+\\)?-2"
280                   mother        =daikanwa
281                   ))
282   (define-charset-alias 'ideograph-daikanwa-2 '=daikanwa@rev1)
283   (define-charset-alias '=daikanwa-rev1 '=daikanwa@rev1)
284
285   (make-charset '=daikanwa@rev2
286                 "Daikanwa dictionary (revised version 2)"
287                 `(long-name     "Daikanwa"
288                   chars         256
289                   dimension     2
290                   columns       2
291                   graphic       2
292                   direction     l2r
293                   registry      "Daikanwa\\(\\.[0-9]+\\)?-3"
294                   mother        =daikanwa
295                   min-code      1
296                   max-code      49964
297                   ;; min-code   #xE00000
298                   ;; max-code   ,(+ #xE00000 50100)
299                   ;; code-offset        #xE00000
300                   ))
301   (define-charset-alias '=daikanwa-rev2 '=daikanwa@rev2)
302
303   (make-charset '=big5-pua
304                 "Big5 with private used area"
305                 '(long-name     "Big5-PUA"
306                   chars         256
307                   dimension     2
308                   columns       2
309                   graphic       2
310                   direction     l2r
311                   mother        chinese-big5
312                   registry      "Big5\\.ETEN"))
313   (define-charset-alias 'chinese-big5-pua '=big5-pua)
314   (make-charset '=big5-eten
315                 "Big5 ETEN"
316                 '(long-name     "Big5-ETEN"
317                   chars         256
318                   dimension     2
319                   columns       2
320                   graphic       2
321                   direction     l2r
322                   mother        chinese-big5
323                   min-code      #x8140
324                   max-code      #xFEFE
325                   registry      "Big5\\.ETEN"))
326   (define-charset-alias 'chinese-big5-eten '=big5-eten)
327   (make-charset 'chinese-big5-eten-a
328                 "Big5 ETEN (#xF9D6 .. #xF9FE)"
329                 '(long-name     "Big5-ETEN-a"
330                   chars         256
331                   dimension     2
332                   columns       2
333                   graphic       2
334                   direction     l2r
335                   mother        chinese-big5
336                   min-code      #xF9D6
337                   max-code      #xF9FE
338                   registry      "Big5\\.ETEN"))
339   (make-charset 'chinese-big5-eten-b
340                 "Big5 ETEN (#xC6A1 .. #xC8FE)"
341                 '(long-name     "Big5-ETEN-b"
342                   chars         256
343                   dimension     2
344                   columns       2
345                   graphic       2
346                   direction     l2r
347                   mother        chinese-big5
348                   min-code      #xC6A1
349                   max-code      #xC8FE
350                   registry      "Big5\\.ETEN"))
351
352   (let* ((i 1)
353          (hzk-min (+ (lsh #x6200 16) 65536))
354          (hzk-max (+ hzk-min 65535)))
355     (while (<= i 12)
356       (make-charset
357        (intern (format "=hanziku-%d" i))
358        (format "HANZIKU (pseudo BIG5 encoding) part %d" i)
359        `(long-name ,(format "HANZIKU-%d" i)
360                    chars 256
361                    dimension 2
362                    columns 2
363                    graphic 2
364                    direction l2r
365                    registry ,(format "hanziku-%d$" i i)
366                    min-code ,hzk-min
367                    max-code ,hzk-max
368                    code-offset ,hzk-min))
369       (define-charset-alias
370         (intern (format "ideograph-hanziku-%d" i))
371         (intern (format "=hanziku-%d" i)))
372       (setq hzk-min (1+ hzk-max)
373             hzk-max (+ hzk-min 65535))
374       (setq i (1+ i))))
375
376   (make-charset '=cbeta "CBETA private characters"
377                 '(long-name     "CBETA PUA"
378                   chars         256
379                   dimension     2
380                   registry      "cbeta-0"
381                   graphic       2
382                   min-code      #xE20000
383                   max-code      #xE2FFFF
384                   code-offset   #xE20000
385                   columns       2
386                   direction     l2r))
387   (define-charset-alias 'ideograph-cbeta '=cbeta)
388
389   (make-charset '=jef-china3
390                 "JEF + CHINA3 private characters"
391                 '(long-name     "JEF + CHINA3"
392                   chars         256
393                   dimension     2
394                   columns       2
395                   graphic       2
396                   direction     l2r
397                   registry      "china3jef-0"
398                   min-code      #xE80000
399                   max-code      #xE8FFFF
400                   code-offset   #xE80000))
401   (define-charset-alias 'china3-jef '=jef-china3)
402
403   (make-charset '=ruimoku-v6
404                 "private characters used in RUIMOKU Version.6"
405                 `(long-name     "RUI6"
406                   chars         256
407                   dimension     2
408                   columns       2
409                   graphic       2
410                   direction     l2r
411                   registry      "rui6-0"
412                   ;; mother     ucs
413                   min-code      #xE90000 ; #xE000
414                   max-code      #xE908FF ; #xE8FF
415                   code-offset   ,(- #xE90000 #xE000)))
416
417   (make-charset '=ucs@iso
418                 "ISO/IEC 10646 for its representative glyphs"
419                 '(long-name     "UCS for ISO"
420                   chars         256
421                   dimension     3
422                   columns       2
423                   graphic       2
424                   direction     l2r
425                   mother        =ucs))
426   (make-charset '=ucs@unicode
427                 "Unicode for its representative glyphs"
428                 '(long-name     "UCS for Unicode"
429                   chars         256
430                   dimension     3
431                   columns       2
432                   graphic       2
433                   direction     l2r
434                   mother        =ucs@iso))
435   (make-charset '=ucs@gb
436                 "ISO/IEC 10646 for GB"
437                 '(long-name     "UCS for GB"
438                   chars         256
439                   dimension     3
440                   columns       2
441                   graphic       2
442                   direction     l2r
443                   mother        =ucs@unicode))
444   (define-charset-alias 'ucs-gb '=ucs@gb)
445   (make-charset '=ucs@cns
446                 "ISO/IEC 10646 for CNS 11643"
447                 '(long-name     "UCS for CNS"
448                   chars         256
449                   dimension     3
450                   columns       2
451                   graphic       2
452                   direction     l2r
453                   mother        =ucs@unicode))
454   (define-charset-alias 'ucs-cns '=ucs@cns)
455   (make-charset '=ucs@jis
456                 "ISO/IEC 10646 for JIS X0208/0212/0213"
457                 '(long-name     "UCS for JIS"
458                   chars         256
459                   dimension     3
460                   columns       2
461                   graphic       2
462                   direction     l2r
463                   mother        =ucs@unicode))
464   (define-charset-alias 'ucs-jis '=ucs@jis)
465   (make-charset '=ucs@jis/1990
466                 "ISO/IEC 10646 for JIS X 0208/0212:1990"
467                 '(long-name     "UCS for JIS:1990"
468                   chars         256
469                   dimension     3
470                   columns       2
471                   graphic       2
472                   direction     l2r
473                   mother        ucs-jis))
474   (define-charset-alias '=ucs@jis-1990 '=ucs@jis/1990)
475   (define-charset-alias '=ucs-jis-1990 '=ucs@jis/1990)
476   (make-charset '=ucs@jis/2000
477                 "ISO/IEC 10646 for JIS X 0213:2000"
478                 '(long-name     "UCS for JIS:2000"
479                   chars         256
480                   dimension     3
481                   columns       2
482                   graphic       2
483                   direction     l2r
484                   mother        ucs-jis))
485   (define-charset-alias '=ucs@jis-2000 '=ucs@jis/2000)
486   (define-charset-alias '=ucs-jis-2000 '=ucs@jis/2000)
487   (make-charset '=ucs@JP
488                 "UCS for common glyphs used in Japan"
489                 '(long-name     "UCS for Japan"
490                   chars         256
491                   dimension     3
492                   columns       2
493                   graphic       2
494                   direction     l2r
495                   mother        =ucs@jis/2000))
496   (define-charset-alias '=ucs@jp '=ucs@JP)
497   (make-charset '=ucs@ks
498                 "ISO/IEC 10646 for Korean Standards"
499                 `(long-name     "UCS for KS"
500                   chars         256
501                   dimension     3
502                   columns       2
503                   graphic       2
504                   direction     l2r
505                   mother        =ucs@unicode))
506   (define-charset-alias 'ucs-ks '=ucs@ks)
507   (make-charset '=ucs@big5
508                 "ISO/IEC 10646 for Big5"
509                 `(long-name     "UCS for Big5"
510                   chars         256
511                   dimension     3
512                   columns       2
513                   graphic       2
514                   direction     l2r
515                   mother        =ucs@unicode))
516   (define-charset-alias 'ucs-big5 '=ucs@big5)
517
518   (make-charset
519    '=ucs-radicals
520    "CJK Radicals of UCS"
521    `(long-name "UCS-Radicals"
522                chars 256
523                dimension 2
524                columns 2
525                graphic 2
526                direction l2r
527                registry "-zh-.*-ucs-0"
528                mother ucs-bmp
529                min-code #x2E00 max-code #x2FFF))
530   (make-charset
531    '=ucs-radicals@unicode
532    "CJK Radicals of UCS"
533    `(long-name "UCS-Radicals"
534                chars 256
535                dimension 2
536                columns 2
537                graphic 2
538                direction l2r
539                registry "-zh-.*-ucs-0"
540                mother =ucs@unicode
541                min-code #x2E00 max-code #x2FFF))
542   (make-charset
543    '=ucs-bmp-cjk
544    "CJK Characters in BMP of UCS"
545    `(long-name "UCS-BMP-CJK"
546                chars 256
547                dimension 2
548                columns 2
549                graphic 2
550                direction l2r
551                registry "-zh-.*-ucs-0"
552                mother ucs-bmp
553                min-code #x2E00 max-code #xA4CF))
554   (make-charset
555    '=ucs-bmp-cjk@unicode
556    "CJK Characters in BMP of Unicode"
557    `(long-name "Unicode-BMP-CJK"
558                chars 256
559                dimension 2
560                columns 2
561                graphic 2
562                direction l2r
563                registry "-zh-.*-ucs-0"
564                mother =ucs@unicode
565                min-code #x2E00 max-code #xA4CF))
566   (make-charset
567    '=ucs-sip-ext-b
568    "CJK Ideographs Extension B"
569    `(long-name "UCS CJK Ext-B"
570                chars 256
571                dimension 2
572                columns 2
573                graphic 2
574                direction l2r
575                registry "\\(iso10646\\|ucs02\\)-2$"
576                mother ucs
577                min-code #x20000 max-code #x2A6D6
578                code-offset #x20000))
579   (make-charset
580    '=ucs-sip-ext-b@iso
581    "CJK Ideographs Extension B (ISO/IEC 10646-2)"
582    `(long-name "UCS CJK Ext-B"
583                chars 256
584                dimension 2
585                columns 2
586                graphic 2
587                direction l2r
588                registry "\\(iso10646\\|ucs02\\)-2$"
589                mother =ucs@iso
590                min-code #x20000 max-code #x2A6D6
591                code-offset #x20000))
592   )
593
594 ;;; mule-conf.el ends here