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