69315469315ceb183b666255cf945ec43c84efcd
[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
30 ;; PinYin-ZhuYin
31 (make-charset 'sisheng "PinYin-ZhuYin"
32               '(registry "sisheng_cwnn\\|OMRON_UDC_ZH"
33                 dimension 1
34                 chars 94
35                 final ?0
36                 graphic 0
37                 ))
38
39 ;; Lao script.
40 ;; ISO10646's 0x0E80..0x0EDF are mapped to 0x20..0x7F.
41 (make-charset 'lao "Lao script"
42               '(registry "MuleLao-1"
43                 dimension 1
44                 chars 94
45                 final ?1
46                 graphic 1))
47
48 ;; IPA (International Phonetic Alphabet)
49 (make-charset 'ipa "International Phonetic Alphabet"
50               '(registry "MuleIPA"
51                 dimension 1
52                 chars 96
53                 final ?0
54                 graphic 1))
55
56 ;; Ethiopic
57 (make-charset 'ethiopic "Ethiopic"
58               '(registry "Ethio"
59                 dimension 2
60                 chars 94
61                 final ?3
62                 graphic 0
63                 ))
64
65 ;; ISO-IR-165 (CCITT Extended GB)
66 ;;    It is based on CCITT Recommendation T.101, includes GB 2312-80 +
67 ;;    GB 8565-88 table A4 + 293 characters.
68 (make-charset '=iso-ir165
69               "ISO-IR-165 (CCITT Extended GB; Chinese simplified)"
70               '(iso-ir 165
71                        dimension 2
72                        chars 94
73                        final ?E
74                        registry "isoir165"
75                        graphic 0))
76 (define-charset-alias 'chinese-isoir165 '=iso-ir165)
77
78 ;; CNS11643 Plane3 thru Plane7
79 ;; These represent more and more obscure Chinese characters.
80 ;; By the time you get to Plane 7, we're talking about characters
81 ;; that appear once in some ancient manuscript and whose meaning
82 ;; is unknown.
83
84 (flet
85     ((make-chinese-cns11643-charset
86       (name iso-ir plane final)
87       (make-charset
88        name (concat "CNS 11643 Plane " plane " (Chinese traditional)")
89        `(iso-ir ,iso-ir
90          registry 
91          ,(concat "CNS11643[.-]\\(.*[.-]\\)?" plane "$")
92          dimension 2
93          chars 94
94          final ,final
95          graphic 0))
96       ))
97   (make-chinese-cns11643-charset 'chinese-cns11643-3 183 "3" ?I)
98   (make-chinese-cns11643-charset 'chinese-cns11643-4 184 "4" ?J)
99   (make-chinese-cns11643-charset 'chinese-cns11643-5 185 "5" ?K)
100   (make-chinese-cns11643-charset 'chinese-cns11643-6 186 "6" ?L)
101   (make-chinese-cns11643-charset 'chinese-cns11643-7 187 "7" ?M)
102   )
103
104 ;; JIS X 0213:2000
105 (if (featurep 'utf-2000)
106     (progn
107       (make-charset
108        '=jis-x0213-1-2000
109        "JIS X 0213:2000 Plain 1"
110        '(iso-ir 228
111                 registry "jisx0213\\(\\.2000\\)-1"
112                 dimension 2
113                 chars 94
114                 mother =jis-x0208-1990
115                 final ?O
116                 graphic 0))
117       (make-charset
118        '=jis-x0213-2-2000
119        "JIS X 0213:2000 Plain 2"
120        '(iso-ir 229
121                 registry "jisx0213\\(\\.2000\\)-2"
122                 dimension 2
123                 chars 94
124                 final ?P
125                 graphic 0))
126       (define-charset-alias 'japanese-jisx0213-1 '=jis-x0213-1-2000)
127       (define-charset-alias 'japanese-jisx0213-2 '=jis-x0213-2-2000)
128       )
129   (make-charset
130    'japanese-jisx0213-1
131    "JIS X 0213:2000 Plain 1"
132    '(registry "jisx0213\\(\\.2000\\)-1"
133               dimension 2
134               chars 94
135               final ?O
136               graphic 0))
137   (make-charset
138    'japanese-jisx0213-2
139    "JIS X 0213:2000 Plain 2"
140    '(registry "jisx0213\\(\\.2000\\)-2"
141               dimension 2
142               chars 94
143               final ?P
144               graphic 0))
145   )
146
147 (when (featurep 'utf-2000)
148   (define-charset-alias 'ucs '=ucs)
149   (define-charset-alias 'japanese-jisx0208-1990 '=jis-x0208-1990)
150   (make-charset '=ucs@gb
151                 "UCS for GB"
152                 `(long-name     "ISO/IEC 10646 for GB"
153                   chars         256
154                   dimension     3
155                   columns       2
156                   graphic       2
157                   direction     l2r
158                   mother        =ucs))
159   (define-charset-alias 'ucs-gb '=ucs@gb)
160   (make-charset '=ucs@cns
161                 "UCS for CNS"
162                 `(long-name     "ISO/IEC 10646 for CNS 11643"
163                   chars         256
164                   dimension     3
165                   columns       2
166                   graphic       2
167                   direction     l2r
168                   mother        =ucs))
169   (define-charset-alias 'ucs-cns '=ucs@cns)
170   (make-charset '=ucs@jis
171                 "UCS for JIS"
172                 `(long-name     "ISO/IEC 10646 for JIS X0208/0212/0213"
173                   chars         256
174                   dimension     3
175                   columns       2
176                   graphic       2
177                   direction     l2r
178                   mother        =ucs))
179   (define-charset-alias 'ucs-jis '=ucs@jis)
180   (make-charset '=ucs@jis-1990
181                 "UCS for JIS:1990"
182                 `(long-name     "ISO/IEC 10646 for JIS X 0208/0212:1990"
183                   chars         256
184                   dimension     3
185                   columns       2
186                   graphic       2
187                   direction     l2r
188                   mother        ucs-jis))
189   (define-charset-alias '=ucs-jis-1990 '=ucs@jis-1990)
190   (make-charset '=ucs@jis-2000
191                 "UCS for JIS:2000"
192                 `(long-name     "ISO/IEC 10646 for JIS X 0213:2000"
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-2000 '=ucs@jis-2000)
200   (make-charset '=ucs@ks
201                 "UCS for KS"
202                 `(long-name     "ISO/IEC 10646 for Korean Standards"
203                   chars         256
204                   dimension     3
205                   columns       2
206                   graphic       2
207                   direction     l2r
208                   mother        =ucs))
209   (define-charset-alias 'ucs-ks '=ucs@ks)
210   (make-charset '=ucs@big5
211                 "UCS for Big5"
212                 `(long-name     "ISO/IEC 10646 for Big5"
213                   chars         256
214                   dimension     3
215                   columns       2
216                   graphic       2
217                   direction     l2r
218                   mother        =ucs))
219   (define-charset-alias 'ucs-big5 '=ucs@big5)
220
221   (make-charset 'ideograph-daikanwa
222                 "Daikanwa"
223                 `(long-name     "Daikanwa dictionary (revised version 2)"
224                   chars         256
225                   dimension     2
226                   columns       2
227                   graphic       2
228                   direction     l2r
229                   registry      "Daikanwa\\(\\.[0-9]+\\)?-3"
230                   min-code      #xE00000
231                   max-code      ,(+ #xE00000 50100)
232                   code-offset   #xE00000))
233
234   (make-charset '=daikanwa-rev1
235                 "Daikanwa Rev."
236                 `(long-name     "Daikanwa dictionary (revised version)"
237                   chars         256
238                   dimension     2
239                   columns       2
240                   graphic       2
241                   direction     l2r
242                   registry      "Daikanwa\\(\\.[0-9]+\\)?-2"))
243   (define-charset-alias 'ideograph-daikanwa-2 '=daikanwa-rev1)
244
245   (make-charset '=daikanwa-rev2
246                 "Daikanwa"
247                 `(long-name     "Daikanwa dictionary (revised version 2)"
248                   chars         256
249                   dimension     2
250                   columns       2
251                   graphic       2
252                   direction     l2r
253                   registry      "Daikanwa\\(\\.[0-9]+\\)?-3"
254                   min-code      #xE00000
255                   max-code      ,(+ #xE00000 50100)
256                   code-offset   #xE00000))
257
258   (make-charset '=big5-pua
259                 "Big5-PUA"
260                 `(long-name     "Big5 with private used area"
261                   chars         256
262                   dimension     2
263                   columns       2
264                   graphic       2
265                   direction     l2r
266                   mother        chinese-big5
267                   registry      "Big5\\.ETEN"))
268   (define-charset-alias 'chinese-big5-pua '=big5-pua)
269   (make-charset '=big5-eten
270                 "Big5-ETEN"
271                 `(long-name     "Big5 ETEN"
272                   chars         256
273                   dimension     2
274                   columns       2
275                   graphic       2
276                   direction     l2r
277                   mother        chinese-big5
278                   min-code      #x8140
279                   max-code      #xFEFE
280                   registry      "Big5\\.ETEN"))
281   (define-charset-alias 'chinese-big5-eten '=big5-eten)
282   (make-charset 'chinese-big5-eten-a
283                 "Big5-ETEN-a"
284                 `(long-name     "Big5 ETEN (#xF9D6 .. #xF9FE)"
285                   chars         256
286                   dimension     2
287                   columns       2
288                   graphic       2
289                   direction     l2r
290                   mother        chinese-big5
291                   min-code      #xF9D6
292                   max-code      #xF9FE
293                   registry      "Big5\\.ETEN"))
294   (make-charset 'chinese-big5-eten-b
295                 "Big5-ETEN-b"
296                 `(long-name     "Big5 ETEN (#xC6A1 .. #xC8FE)"
297                   chars         256
298                   dimension     2
299                   columns       2
300                   graphic       2
301                   direction     l2r
302                   mother        chinese-big5
303                   min-code      #xC6A1
304                   max-code      #xC8FE
305                   registry      "Big5\\.ETEN"))
306   (make-charset '=big5-cdp
307                 "Big5-CDP"
308                 `(long-name     "Big5 with CDP extension"
309                   chars         256
310                   dimension     2
311                   columns       2
312                   graphic       2
313                   direction     l2r
314                   registry      "big5\\.cdp-0"
315                   mother        chinese-big5
316                   min-code      #x8140
317                   max-code      #x8DFE))
318   (define-charset-alias 'chinese-big5-cdp '=big5-cdp)
319   (let* ((i 1)
320          (hzk-min (+ (lsh #x6200 16) 65536))
321          (hzk-max (+ hzk-min 65535)))
322     (while (<= i 12)
323       (make-charset
324        (intern (format "=hanziku-%d" i))
325        (format "HANZIKU-%d" i)
326        `(long-name ,(format "HANZIKU (pseudo BIG5 encoding) part %d" i)
327                    chars 256
328                    dimension 2
329                    columns 2
330                    graphic 2
331                    direction l2r
332                    registry ,(format "hanziku-%d$" i i)
333                    min-code ,hzk-min
334                    max-code ,hzk-max
335                    code-offset ,hzk-min))
336       (define-charset-alias
337         (intern (format "ideograph-hanziku-%d" i))
338         (intern (format "=hanziku-%d" i)))
339       (setq hzk-min (1+ hzk-max)
340             hzk-max (+ hzk-min 65535))
341       (setq i (1+ i))))
342
343   (make-charset '=gt
344                 "GT"
345                 `(long-name     "GT 2000"
346                   chars         256
347                   dimension     3
348                   columns       2
349                   graphic       2
350                   direction     l2r
351                   registry      ""
352                   min-code      ,(lsh #x6100 16)
353                   max-code      ,(+ (lsh #x6100 16) 67547)
354                   code-offset   ,(lsh #x6100 16)))
355   (define-charset-alias 'ideograph-gt '=gt)
356   (make-charset '=gt-k
357                 "GT parts"
358                 `(long-name     "Ideographic parts of GT"
359                   chars         256
360                   dimension     2
361                   columns       2
362                   graphic       2
363                   direction     l2r
364                   registry      ""
365                   min-code      ,(lsh #x6110 16)
366                   max-code      ,(+ (lsh #x6110 16) 17090)
367                   code-offset   ,(lsh #x6110 16)))
368   (define-charset-alias 'ideograph-gt-k '=gt-k)
369   (let ((i 1))
370     (while (<= i 11)
371       (make-charset
372        (intern (format "=gt-pj-%d" i))
373        (format "GT PJ %d" i)
374        `(long-name ,(format "GT 2000 (pseudo JIS encoding) part %d" i)
375                    chars 94
376                    dimension 2
377                    columns 2
378                    graphic 0
379                    direction l2r
380                    registry ,(format "\\(GTpj-%d\\|jisx0208\\.GT-%d\\)$" i i)))
381       (define-charset-alias
382         (intern (format "ideograph-gt-pj-%d" i))
383         (intern (format "=gt-pj-%d" i)))
384       (setq i (1+ i))))
385   (make-charset
386    '=gt-pj-k1
387    "GT K1"
388    `(long-name "Ideographic parts of GT (pseudo JIS encoding) part 1"
389                chars 94
390                dimension 2
391                columns 2
392                graphic 0
393                direction l2r
394                registry "\\(GTKpj-1\\|jisx0208\\.GTK-1\\)$"))
395   (define-charset-alias 'ideograph-gt-pj-k1 '=gt-pj-k1)
396   (make-charset
397    '=gt-pj-k2
398    "GT K2"
399    `(long-name "Ideographic parts of GT (pseudo JIS encoding) part 2"
400                chars 94
401                dimension 2
402                columns 2
403                graphic 0
404                direction l2r
405                registry "\\(GTKpj-2\\|jisx0208\\.GTK-2\\)$"))
406   (define-charset-alias 'ideograph-gt-pj-k2 '=gt-pj-k2)
407   (make-charset '=cbeta "CBETA PUA"
408                 '(long-name     "CBETA private characters"
409                   chars         256
410                   dimension     2
411                   registry      "cbeta-0"
412                   graphic       2
413                   min-code      #xE20000
414                   max-code      #xE2FFFF
415                   code-offset   #xE20000
416                   columns       2
417                   direction     l2r))
418   (define-charset-alias 'ideograph-cbeta '=cbeta)
419   (make-charset '=jef-china3
420                 "JEF + CHINA3"
421                 `(long-name     "JEF + CHINA3 private characters"
422                   chars         256
423                   dimension     2
424                   columns       2
425                   graphic       2
426                   direction     l2r
427                   registry      "china3jef-0"
428                   min-code      #xE80000
429                   max-code      #xE8FFFF
430                   code-offset   #xE80000))
431   (define-charset-alias 'china3-jef '=jef-china3)
432   )
433
434 ;;; mule-conf.el ends here