e8adb9adc610120fad49e384b03b8356a575fc79
[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   (make-charset
178    '=jis-x0208@1997
179    "JIS X 0208 based on the unification rule of 1997 edition."
180    '(registry "jisx0208\\.1990"
181               dimension 2
182               chars 94
183               mother =jis-x0208
184               ;; final ?B
185               graphic 0))
186
187   (make-charset '=big5-cdp
188                 "Big5 with CDP extension"
189                 '(long-name     "Big5-CDP"
190                   chars         256
191                   dimension     2
192                   columns       2
193                   graphic       2
194                   direction     l2r
195                   registry      "big5\\.cdp-0"
196                   mother        chinese-big5
197                   min-code      #x8140
198                   max-code      #x8DFE))
199   (define-charset-alias 'chinese-big5-cdp '=big5-cdp)
200
201   (make-charset '=gt
202                 "GT 2000"
203                 `(long-name     "GT"
204                   chars         256
205                   dimension     3
206                   columns       2
207                   graphic       2
208                   direction     l2r
209                   registry      ""
210                   min-code      ,(lsh #x6100 16)
211                   max-code      ,(+ (lsh #x6100 16) 67547)
212                   code-offset   ,(lsh #x6100 16)))
213   (define-charset-alias 'ideograph-gt '=gt)
214   (make-charset '=gt-k
215                 "Ideographic components of GT"
216                 `(long-name     "GT components"
217                   chars         256
218                   dimension     2
219                   columns       2
220                   graphic       2
221                   direction     l2r
222                   registry      ""
223                   min-code      ,(lsh #x6110 16)
224                   max-code      ,(+ (lsh #x6110 16) 17090)
225                   code-offset   ,(lsh #x6110 16)))
226   (define-charset-alias 'ideograph-gt-k '=gt-k)
227   (let ((i 1))
228     (while (<= i 11)
229       (make-charset
230        (intern (format "=gt-pj-%d" i))
231        (format "GT 2000 (pseudo JIS encoding) part %d" i)
232        `(long-name ,(format "GT PJ %d" i)
233                    chars 94
234                    dimension 2
235                    columns 2
236                    graphic 0
237                    direction l2r
238                    registry ,(format "\\(GTpj-%d\\|jisx0208\\.GT-%d\\)$" i i)))
239       (define-charset-alias
240         (intern (format "ideograph-gt-pj-%d" i))
241         (intern (format "=gt-pj-%d" i)))
242       (setq i (1+ i))))
243   (make-charset
244    '=gt-pj-k1
245    "Ideographic parts of GT (pseudo JIS encoding) part 1"
246    '(long-name "GT K1"
247                chars 94
248                dimension 2
249                columns 2
250                graphic 0
251                direction l2r
252                registry "\\(GTKpj-1\\|jisx0208\\.GTK-1\\)$"))
253   (define-charset-alias 'ideograph-gt-pj-k1 '=gt-pj-k1)
254   (make-charset
255    '=gt-pj-k2
256    "Ideographic parts of GT (pseudo JIS encoding) part 2"
257    '(long-name "GT K2"
258                chars 94
259                dimension 2
260                columns 2
261                graphic 0
262                direction l2r
263                registry "\\(GTKpj-2\\|jisx0208\\.GTK-2\\)$"))
264   (define-charset-alias 'ideograph-gt-pj-k2 '=gt-pj-k2)
265
266   (make-charset '=daikanwa
267                 "Daikanwa dictionary (revised version 2)"
268                 `(long-name     "Daikanwa"
269                   chars         256
270                   dimension     2
271                   columns       2
272                   graphic       2
273                   direction     l2r
274                   registry      "Daikanwa\\(\\.[0-9]+\\)?-3"
275                   min-code      #xE00000
276                   max-code      ,(+ #xE00000 50100)
277                   code-offset   #xE00000))
278   (define-charset-alias 'ideograph-daikanwa '=daikanwa)
279
280   (make-charset '=daikanwa@rev1
281                 "Daikanwa dictionary (revised version)"
282                 `(long-name     "Daikanwa Rev."
283                   chars         256
284                   dimension     2
285                   columns       2
286                   graphic       2
287                   direction     l2r
288                   registry      "Daikanwa\\(\\.[0-9]+\\)?-2"
289                   mother        =daikanwa
290                   ))
291   (define-charset-alias 'ideograph-daikanwa-2 '=daikanwa@rev1)
292   (define-charset-alias '=daikanwa-rev1 '=daikanwa@rev1)
293
294   (make-charset '=daikanwa@rev2
295                 "Daikanwa dictionary (revised version 2)"
296                 `(long-name     "Daikanwa"
297                   chars         256
298                   dimension     2
299                   columns       2
300                   graphic       2
301                   direction     l2r
302                   registry      "Daikanwa\\(\\.[0-9]+\\)?-3"
303                   mother        =daikanwa
304                   min-code      1
305                   max-code      49964
306                   ;; min-code   #xE00000
307                   ;; max-code   ,(+ #xE00000 50100)
308                   ;; code-offset        #xE00000
309                   ))
310   (define-charset-alias '=daikanwa-rev2 '=daikanwa@rev2)
311
312   (make-charset '=big5-pua
313                 "Big5 with private used area"
314                 '(long-name     "Big5-PUA"
315                   chars         256
316                   dimension     2
317                   columns       2
318                   graphic       2
319                   direction     l2r
320                   mother        chinese-big5
321                   registry      "Big5\\.ETEN"))
322   (define-charset-alias 'chinese-big5-pua '=big5-pua)
323   (make-charset '=big5-eten
324                 "Big5 ETEN"
325                 '(long-name     "Big5-ETEN"
326                   chars         256
327                   dimension     2
328                   columns       2
329                   graphic       2
330                   direction     l2r
331                   mother        chinese-big5
332                   min-code      #x8140
333                   max-code      #xFEFE
334                   registry      "Big5\\.ETEN"))
335   (define-charset-alias 'chinese-big5-eten '=big5-eten)
336   (make-charset 'chinese-big5-eten-a
337                 "Big5 ETEN (#xF9D6 .. #xF9FE)"
338                 '(long-name     "Big5-ETEN-a"
339                   chars         256
340                   dimension     2
341                   columns       2
342                   graphic       2
343                   direction     l2r
344                   mother        chinese-big5
345                   min-code      #xF9D6
346                   max-code      #xF9FE
347                   registry      "Big5\\.ETEN"))
348   (make-charset 'chinese-big5-eten-b
349                 "Big5 ETEN (#xC6A1 .. #xC8FE)"
350                 '(long-name     "Big5-ETEN-b"
351                   chars         256
352                   dimension     2
353                   columns       2
354                   graphic       2
355                   direction     l2r
356                   mother        chinese-big5
357                   min-code      #xC6A1
358                   max-code      #xC8FE
359                   registry      "Big5\\.ETEN"))
360
361   (let* ((i 1)
362          (hzk-min (+ (lsh #x6200 16) 65536))
363          (hzk-max (+ hzk-min 65535)))
364     (while (<= i 12)
365       (make-charset
366        (intern (format "=hanziku-%d" i))
367        (format "HANZIKU (pseudo BIG5 encoding) part %d" i)
368        `(long-name ,(format "HANZIKU-%d" i)
369                    chars 256
370                    dimension 2
371                    columns 2
372                    graphic 2
373                    direction l2r
374                    registry ,(format "hanziku-%d$" i i)
375                    min-code ,hzk-min
376                    max-code ,hzk-max
377                    code-offset ,hzk-min))
378       (define-charset-alias
379         (intern (format "ideograph-hanziku-%d" i))
380         (intern (format "=hanziku-%d" i)))
381       (setq hzk-min (1+ hzk-max)
382             hzk-max (+ hzk-min 65535))
383       (setq i (1+ i))))
384
385   (make-charset '=cbeta "CBETA private characters"
386                 '(long-name     "CBETA PUA"
387                   chars         256
388                   dimension     2
389                   registry      "cbeta-0"
390                   graphic       2
391                   min-code      #xE20000
392                   max-code      #xE2FFFF
393                   code-offset   #xE20000
394                   columns       2
395                   direction     l2r))
396   (define-charset-alias 'ideograph-cbeta '=cbeta)
397
398   (make-charset '=jef-china3
399                 "JEF + CHINA3 private characters"
400                 '(long-name     "JEF + CHINA3"
401                   chars         256
402                   dimension     2
403                   columns       2
404                   graphic       2
405                   direction     l2r
406                   registry      "china3jef-0"
407                   min-code      #xE80000
408                   max-code      #xE8FFFF
409                   code-offset   #xE80000))
410   (define-charset-alias 'china3-jef '=jef-china3)
411
412   (make-charset '=ruimoku-v6
413                 "private characters used in RUIMOKU Version.6"
414                 `(long-name     "RUI6"
415                   chars         256
416                   dimension     2
417                   columns       2
418                   graphic       2
419                   direction     l2r
420                   registry      "rui6-0"
421                   ;; mother     ucs
422                   min-code      #xE90000 ; #xE000
423                   max-code      #xE908FF ; #xE8FF
424                   code-offset   ,(- #xE90000 #xE000)))
425
426   (make-charset '=ucs@iso
427                 "ISO/IEC 10646 for its representative glyphs"
428                 '(long-name     "UCS for ISO"
429                   chars         256
430                   dimension     3
431                   columns       2
432                   graphic       2
433                   direction     l2r
434                   mother        =ucs))
435   (make-charset '=ucs@unicode
436                 "Unicode for its representative glyphs"
437                 '(long-name     "UCS for Unicode"
438                   chars         256
439                   dimension     3
440                   columns       2
441                   graphic       2
442                   direction     l2r
443                   mother        =ucs@iso))
444   (make-charset '=ucs@gb
445                 "ISO/IEC 10646 for GB"
446                 '(long-name     "UCS for GB"
447                   chars         256
448                   dimension     3
449                   columns       2
450                   graphic       2
451                   direction     l2r
452                   mother        =ucs@unicode))
453   (define-charset-alias 'ucs-gb '=ucs@gb)
454   (make-charset '=ucs@cns
455                 "ISO/IEC 10646 for CNS 11643"
456                 '(long-name     "UCS for CNS"
457                   chars         256
458                   dimension     3
459                   columns       2
460                   graphic       2
461                   direction     l2r
462                   mother        =ucs@unicode))
463   (define-charset-alias 'ucs-cns '=ucs@cns)
464   (make-charset '=ucs@jis
465                 "ISO/IEC 10646 for JIS X0208/0212/0213"
466                 '(long-name     "UCS for JIS"
467                   chars         256
468                   dimension     3
469                   columns       2
470                   graphic       2
471                   direction     l2r
472                   mother        =ucs@unicode))
473   (define-charset-alias 'ucs-jis '=ucs@jis)
474   (make-charset '=ucs@jis/fw
475                 "ISO/IEC 10646 for JIS X0208/0212/0213 with fullwidth"
476                 '(long-name     "UCS for JIS-fullwidth"
477                   chars         256
478                   dimension     3
479                   columns       2
480                   graphic       2
481                   direction     l2r
482                   mother        =ucs@jis))
483   (make-charset '=ucs@jis/1990
484                 "ISO/IEC 10646 for JIS X 0208/0212:1990"
485                 '(long-name     "UCS for JIS:1990"
486                   chars         256
487                   dimension     3
488                   columns       2
489                   graphic       2
490                   direction     l2r
491                   mother        ucs-jis))
492   (define-charset-alias '=ucs@jis-1990 '=ucs@jis/1990)
493   (define-charset-alias '=ucs-jis-1990 '=ucs@jis/1990)
494   (make-charset '=ucs@jis/2000
495                 "ISO/IEC 10646 for JIS X 0213:2000"
496                 '(long-name     "UCS for JIS:2000"
497                   chars         256
498                   dimension     3
499                   columns       2
500                   graphic       2
501                   direction     l2r
502                   mother        ucs-jis))
503   (define-charset-alias '=ucs@jis-2000 '=ucs@jis/2000)
504   (define-charset-alias '=ucs-jis-2000 '=ucs@jis/2000)
505   (make-charset '=ucs@JP
506                 "UCS for common glyphs used in Japan"
507                 '(long-name     "UCS for Japan"
508                   chars         256
509                   dimension     3
510                   columns       2
511                   graphic       2
512                   direction     l2r
513                   mother        =ucs@jis/2000))
514   (define-charset-alias '=ucs@jp '=ucs@JP)
515   (make-charset '=ucs@ks
516                 "ISO/IEC 10646 for Korean Standards"
517                 `(long-name     "UCS for KS"
518                   chars         256
519                   dimension     3
520                   columns       2
521                   graphic       2
522                   direction     l2r
523                   mother        =ucs@unicode))
524   (define-charset-alias 'ucs-ks '=ucs@ks)
525   (make-charset '=ucs@big5
526                 "ISO/IEC 10646 for Big5"
527                 `(long-name     "UCS for Big5"
528                   chars         256
529                   dimension     3
530                   columns       2
531                   graphic       2
532                   direction     l2r
533                   mother        =ucs@unicode))
534   (define-charset-alias 'ucs-big5 '=ucs@big5)
535
536   (make-charset
537    '=ucs-radicals
538    "CJK Radicals of UCS"
539    `(long-name "UCS-Radicals"
540                chars 256
541                dimension 2
542                columns 2
543                graphic 2
544                direction l2r
545                registry "-zh-.*-ucs-0"
546                mother ucs-bmp
547                min-code #x2E00 max-code #x2FFF))
548   (make-charset
549    '=ucs-radicals@unicode
550    "CJK Radicals of UCS"
551    `(long-name "UCS-Radicals"
552                chars 256
553                dimension 2
554                columns 2
555                graphic 2
556                direction l2r
557                registry "-zh-.*-ucs-0"
558                mother =ucs@unicode
559                min-code #x2E00 max-code #x2FFF))
560   (make-charset
561    '=ucs-bmp-cjk
562    "CJK Characters in BMP of UCS"
563    `(long-name "UCS-BMP-CJK"
564                chars 256
565                dimension 2
566                columns 2
567                graphic 2
568                direction l2r
569                registry "-zh-.*-ucs-0"
570                mother ucs-bmp
571                min-code #x2E00 max-code #xA4CF))
572   (make-charset
573    '=ucs-bmp-cjk@unicode
574    "CJK Characters in BMP of Unicode"
575    `(long-name "Unicode-BMP-CJK"
576                chars 256
577                dimension 2
578                columns 2
579                graphic 2
580                direction l2r
581                registry "-zh-.*-ucs-0"
582                mother =ucs@unicode
583                min-code #x2E00 max-code #xA4CF))
584   (make-charset
585    '=ucs-sip-ext-b
586    "CJK Ideographs Extension B"
587    `(long-name "UCS CJK Ext-B"
588                chars 256
589                dimension 2
590                columns 2
591                graphic 2
592                direction l2r
593                registry "\\(iso10646\\|ucs02\\)-2$"
594                mother ucs
595                min-code #x20000 max-code #x2A6D6
596                code-offset #x20000))
597   (make-charset
598    '=ucs-sip-ext-b@iso
599    "CJK Ideographs Extension B (ISO/IEC 10646-2)"
600    `(long-name "UCS CJK Ext-B"
601                chars 256
602                dimension 2
603                columns 2
604                graphic 2
605                direction l2r
606                registry "\\(iso10646\\|ucs02\\)-2$"
607                mother =ucs@iso
608                min-code #x20000 max-code #x2A6D6
609                code-offset #x20000))
610   )
611
612 ;;; mule-conf.el ends here