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