(Qmac): Remove (duplicated) definition.
[bpt/emacs.git] / lisp / international / mule-conf.el
CommitLineData
08c19a27
KH
1;;; mule-conf.el --- configure multilingual environment
2
08c19a27 3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
fa526c4a 4;; Licensed to the Free Software Foundation.
c0e17dd8
KH
5;; Copyright (C) 2001, 2002
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H13PRO009
9fea1ee1 8;; Copyright (C) 2002 Free Software Foundation, Inc.
08c19a27 9
24adcac1 10;; Keywords: i18n, mule, multilingual, character set, coding system
08c19a27
KH
11
12;; This file is part of GNU Emacs.
13
14;; GNU Emacs is free software; you can redistribute it and/or modify
15;; it under the terms of the GNU General Public License as published by
16;; the Free Software Foundation; either version 2, or (at your option)
17;; any later version.
18
19;; GNU Emacs is distributed in the hope that it will be useful,
20;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;; GNU General Public License for more details.
23
24;; You should have received a copy of the GNU General Public License
25;; along with GNU Emacs; see the file COPYING. If not, write to the
26;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27;; Boston, MA 02111-1307, USA.
28
29;;; Commentary:
30
3803079c
DL
31;; This file defines the Emacs charsets and some basic coding systems.
32;; Other coding systems are defined in the files in directory
33;; lisp/language.
08c19a27
KH
34
35;;; Code:
36
3803079c
DL
37;; The ISO-IR registry is at http://www.itscj.ipsj.or.jp/ISO-IR/.
38;; Standards docs equivalent to iso-2022 and iso-8859 are at
39;; http://www.ecma.ch/.
40
08c19a27
KH
41;;; Definitions of character sets.
42
24adcac1 43;; The charsets `ascii' and `unicode' are already defined in charset.c
c0e17dd8
KH
44;; as below:
45;;
46;; (define-charset 'ascii
47;; ""
48;; :dimension 1
49;; :code-space [0 127]
50;; :iso-final-char ?A
51;; :ascii-compatible-p t
52;; :emacs-mule-id 0
53;; :code-offset 0)
54;;
55;; (define-charset 'unicode
56;; ""
57;; :dimension 3
58;; :code-space [0 255 0 255 0 16]
59;; :ascii-compatible-p t
60;; :code-offset 0)
61;;
62;; We now set :docstring, :short-name, and :long-name properties.
63
64(put-charset-property
65 'ascii :docstring "ASCII (ISO646 IRV)")
66(put-charset-property
67 'ascii :short-name "ASCII")
68(put-charset-property
69 'ascii :long-name "ASCII (ISO646 IRV)")
70(put-charset-property
71 'unicode :docstring "Unicode (ISO10646)")
72(put-charset-property
73 'unicode :short-name "Unicode")
74(put-charset-property
75 'unicode :long-name "Unicode (ISO10646)")
76
77(define-charset-alias 'ucs 'unicode)
78
79(define-charset 'emacs
80 "Full Emacs characters."
81 :ascii-compatible-p t
82 :code-space [ 0 255 0 255 0 63 ]
83 :code-offset 0
84 :supplementary-p t)
85
86(define-charset 'iso-8859-1
24adcac1 87 "Latin-1 (ISO/IEC 8859-1)"
c0e17dd8
KH
88 :short-name "Latin-1"
89 :ascii-compatible-p t
90 :code-space [0 255]
91 :code-offset 0)
92
93(define-charset 'latin-iso8859-1
94 "Right-Hand Part of ISO/IEC 8859/1 (Latin-1): ISO-IR-100"
95 :short-name "RHP of Latin-1"
96 :long-name "RHP of ISO/IEC 8859/1 (Latin-1): ISO-IR-100"
97 :iso-final-char ?A
98 :emacs-mule-id 129
99 :code-space [32 127]
100 :code-offset 160)
101
102(define-charset 'eight-bit-control
103 "8-bit control code (0x80..0x9F)"
104 :short-name "8-bit control code"
105 :code-space [128 159]
106 :code-offset 128)
107
108(define-charset 'eight-bit-graphic
109 "8-bit graphic code (0xA0..0xFF)"
110 :short-name "8-bit graphic code"
111 :code-space [160 255]
112 :code-offset 160)
113
114(defmacro define-iso-single-byte-charset (symbol iso-symbol name nickname
115 iso-ir iso-final
116 emacs-mule-id map)
117 "For internal use only."
118 `(progn
119 (define-charset ,symbol
120 ,name
121 :short-name ,nickname
122 :long-name ,name
123 :ascii-compatible-p t
124 :code-space [0 255]
125 :map ,map)
126 (if ,iso-symbol
127 (define-charset ,iso-symbol
128 (if ,iso-ir
129 (format "Right-Hand Part of %s (%s): ISO-IR-%d"
130 ,name ,nickname ,iso-ir)
131 (format "Right-Hand Part of %s (%s)" ,name ,nickname))
132 :short-name (format "RHP of %s" ,name)
133 :long-name (format "RHP of %s (%s)" ,name ,nickname)
134 :iso-final-char ,iso-final
24adcac1 135 :emacs-mule-id ,emacs-mule-id
c0e17dd8
KH
136 :code-space [32 127]
137 :parents (list (cons ,symbol 128))))))
138
139(define-iso-single-byte-charset 'iso-8859-2 'latin-iso8859-2
140 "ISO/IEC 8859/2" "Latin-2" 101 ?B 130 "8859-2")
141
142(define-iso-single-byte-charset 'iso-8859-3 'latin-iso8859-3
143 "ISO/IEC 8859/3" "Latin-3" 109 ?C 131 "8859-3")
144
145(define-iso-single-byte-charset 'iso-8859-4 'latin-iso8859-4
146 "ISO/IEC 8859/4" "Latin-4" 110 ?D 132 "8859-4")
147
148(define-iso-single-byte-charset 'iso-8859-5 'cyrillic-iso8859-5
149 "ISO/IEC 8859/5" "Latin/Cyrillic" 144 ?L 140 "8859-5")
150
151(define-iso-single-byte-charset 'iso-8859-6 'arabic-iso8859-6
152 "ISO/IEC 8859/6" "Latin/Arabic" 127 ?G 135 "8859-6")
153
154(define-iso-single-byte-charset 'iso-8859-7 'greek-iso8859-7
155 "ISO/IEC 8859/7" "Latin/Greek" 126 ?F 134 "8859-7")
156
157(define-iso-single-byte-charset 'iso-8859-8 'hebrew-iso8859-8
158 "ISO/IEC 8859/8" "Latin/Hebrew" 138 ?H 136 "8859-8")
159
160(define-iso-single-byte-charset 'iso-8859-9 'latin-iso8859-9
161 "ISO/IEC 8859/9" "Latin-5" 148 ?M 141 "8859-9")
162
3803079c
DL
163(define-iso-single-byte-charset 'iso-8859-10 'latin-iso8859-10
164 "ISO/IEC 8859/9" "Latin-6" 157 ?V nil "8859-10")
165
166;; 8859-11, 12 don't (yet?) exist.
167
c0e17dd8 168(define-iso-single-byte-charset 'iso-8859-13 'latin-iso8859-13
3803079c 169 "ISO/IEC 8859/13" "Latin-7" 179 ?Y nil "8859-13")
c0e17dd8
KH
170
171(define-iso-single-byte-charset 'iso-8859-14 'latin-iso8859-14
172 "ISO/IEC 8859/14" "Latin-8" 199 ?_ 143 "8859-14")
173
174(define-iso-single-byte-charset 'iso-8859-15 'latin-iso8859-15
175 "ISO/IEC 8859/15" "Latin-9" 203 ?b 142 "8859-15")
176
7e8b4d67 177(define-iso-single-byte-charset 'iso-8859-16 'latin-iso8859-16
08a2119c 178 "ISO/IEC 8859/16" "Latin-10" 226 ?f nil "8859-16")
7e8b4d67 179
c0e17dd8
KH
180(define-charset 'thai-tis620
181 "TIS620.2533"
182 :short-name "TIS620.2533"
183 :iso-final-char ?T
184 :emacs-mule-id 133
185 :code-space [32 127]
186 :code-offset #x0E00)
187
188(define-charset 'tis620-2533
189 "TIS620.2533"
190 :short-name "TIS620.2533"
191 :ascii-compatible-p t
192 :code-space [0 255]
193 :parents '(ascii eight-bit-control (thai-tis620 . -128)))
194
195(define-charset 'jisx0201
196 "JISX0201"
197 :short-name "JISX0201"
198 :long-name "JISX0201"
199 :code-space [33 254]
200 :map "jisx0201")
201
202(define-charset 'latin-jisx0201
203 "Roman Part of JISX0201.1976"
204 :short-name "JISX0201 Roman"
205 :long-name "Japanese Roman (JISX0201.1976)"
206 :iso-final-char ?J
207 :emacs-mule-id 138
208 :code-space [33 126]
209 :parents '(jisx0201))
210
211(define-charset 'katakana-jisx0201
212 "Katakana Part of JISX0201.1976"
213 :short-name "JISX0201 Katakana"
214 :long-name "Japanese Katakana (JISX0201.1976)"
215 :iso-final-char ?I
216 :emacs-mule-id 137
217 :code-space [33 126]
218 :parents '((jisx0201 . #x80)))
219
220(define-charset 'chinese-gb2312
221 "GB2312 Chinese simplified: ISO-IR-58"
222 :short-name "GB2312"
223 :long-name "GB2312: ISO-IR-58"
224 :iso-final-char ?A
225 :emacs-mule-id 145
226 :code-space [33 126 33 126]
227 :code-offset #x110000
228 :unify-map "gb2312-1980")
229
7c9e1024 230(define-charset 'chinese-gbk
24adcac1 231 "GBK Chinese simplified."
7c9e1024
KH
232 :short-name "GBK"
233 :long-name "GBK"
234 :code-space [#x40 #xFE #x81 #xFE]
235 :code-offset #x150000
236 :unify-map "gbk")
237
c0e17dd8
KH
238(define-charset 'chinese-cns11643-1
239 "CNS11643 Plane 1 Chinese traditional: ISO-IR-171"
240 :short-name "CNS11643-1"
241 :long-name "CNS11643-1 (Chinese traditional): ISO-IR-171"
242 :iso-final-char ?G
243 :emacs-mule-id 149
244 :code-space [33 126 33 126]
245 :code-offset #x114000
246 :unify-map "cns11643-1")
247
248(define-charset 'chinese-cns11643-2
249 "CNS11643 Plane 2 Chinese traditional: ISO-IR-172"
250 :short-name "CNS11643-2"
251 :long-name "CNS11643-2 (Chinese traditional): ISO-IR-172"
252 :iso-final-char ?H
253 :emacs-mule-id 150
254 :code-space [33 126 33 126]
255 :code-offset #x118000
256 :unify-map "cns11643-2")
257
258(define-charset 'chinese-cns11643-3
259 "CNS11643 Plane 3 Chinese Traditional: ISO-IR-183"
260 :short-name "CNS11643-3"
261 :long-name "CNS11643-3 (Chinese traditional): ISO-IR-183"
262 :iso-final-char ?I
263 :code-space [33 126 33 126]
264 :emacs-mule-id 246
265 :code-offset #x11C000)
266
267(define-charset 'chinese-cns11643-4
268 "CNS11643 Plane 4 Chinese Traditional: ISO-IR-184"
269 :short-name "CNS11643-4"
270 :long-name "CNS11643-4 (Chinese traditional): ISO-IR-184"
271 :iso-final-char ?J
272 :emacs-mule-id 247
273 :code-space [33 126 33 126]
274 :code-offset #x120000)
275
276(define-charset 'chinese-cns11643-5
277 "CNS11643 Plane 5 Chinese Traditional: ISO-IR-185"
278 :short-name "CNS11643-5"
279 :long-name "CNS11643-5 (Chinese traditional): ISO-IR-185"
280 :iso-final-char ?K
281 :emacs-mule-id 248
282 :code-space [33 126 33 126]
283 :code-offset #x124000)
284
285(define-charset 'chinese-cns11643-6
286 "CNS11643 Plane 6 Chinese Traditional: ISO-IR-186"
287 :short-name "CNS11643-6"
288 :long-name "CNS11643-6 (Chinese traditional): ISO-IR-186"
289 :iso-final-char ?L
290 :emacs-mule-id 249
291 :code-space [33 126 33 126]
292 :code-offset #x128000)
293
294(define-charset 'chinese-cns11643-7
295 "CNS11643 Plane 7 Chinese Traditional: ISO-IR-187"
296 :short-name "CNS11643-7"
297 :long-name "CNS11643-7 (Chinese traditional): ISO-IR-187"
298 :iso-final-char ?M
299 :emacs-mule-id 250
300 :code-space [33 126 33 126]
301 :code-offset #x12C000)
302
303(define-charset 'big5
304 "Big5 (Chinese traditional)"
305 :short-name "Big5"
306 :long-name "Big5"
307 :code-space [#x40 #xFE #xA1 #xFE]
308 :code-offset #x130000
309 :unify-map "big5")
310
311(define-charset 'chinese-big5-1
24adcac1 312 "Frequently used part (A141-C67E) of Big5 (Chinese traditional)"
c0e17dd8
KH
313 :short-name "Big5 (Level-1)"
314 :long-name "Big5 (Level-1) A141-C67F"
315 :iso-final-char ?0
316 :emacs-mule-id 152
317 :code-space [#x21 #x7E #x21 #x7E]
7c9e1024 318 :code-offset #x135000
c0e17dd8
KH
319 :unify-map "big5-1")
320
321(define-charset 'chinese-big5-2
24adcac1 322 "Less frequently used part (C940-FEFE) of Big5 (Chinese traditional)"
c0e17dd8
KH
323 :short-name "Big5 (Level-2)"
324 :long-name "Big5 (Level-2) C940-FEFE"
325 :iso-final-char ?1
326 :emacs-mule-id 153
327 :code-space [#x21 #x7E #x21 #x7E]
7c9e1024 328 :code-offset #x137800
c0e17dd8
KH
329 :unify-map "big5-2")
330
331(define-charset 'japanese-jisx0208
332 "JISX0208.1983/1990 Japanese Kanji: ISO-IR-87"
333 :short-name "JISX0208"
334 :long-name "JISX0208.1983/1990 (Japanese): ISO-IR-87"
335 :iso-final-char ?B
336 :emacs-mule-id 146
337 :code-space [33 126 33 126]
338 :code-offset #x140000
339 :unify-map "jisx0208-1990")
340
341(define-charset 'japanese-jisx0208-1978
342 "JISX0208.1978 Japanese Kanji (so called \"old JIS\"): ISO-IR-42"
343 :short-name "JISX0208.1978"
344 :long-name "JISX0208.1978 (Japanese): ISO-IR-42"
345 :iso-final-char ?@
346 :emacs-mule-id 144
347 :code-space [33 126 33 126]
348 :code-offset #x144000
349 :unify-map "jisx0208-1978")
350
351(define-charset 'japanese-jisx0212
352 "JISX0212 Japanese supplement: ISO-IR-159"
353 :short-name "JISX0212"
354 :long-name "JISX0212 (Japanese): ISO-IR-159"
355 :iso-final-char ?D
356 :emacs-mule-id 148
357 :code-space [33 126 33 126]
358 :code-offset #x148000
359 :unify-map "jisx0212-1990")
360
361(define-charset 'japanese-jisx0213-1
362 "JISX0213 Plane 1 (Japanese)"
363 :short-name "JISX0213-1"
364 :long-name "JISX0213-1"
365 :iso-final-char ?O
366 :emacs-mule-id 151
367 :code-space [33 126 33 126]
368 :code-offset #x14C000)
369
370(define-charset 'japanese-jisx0213-2
371 "JISX0213 Plane 2 (Japanese)"
372 :short-name "JISX0213-2"
24adcac1 373 :long-name "JISX0213-2"
c0e17dd8
KH
374 :iso-final-char ?P
375 :emacs-mule-id 254
376 :code-space [33 126 33 126]
377 :code-offset #x150000)
378
379(define-charset 'korean-ksc5601
380 "KSC5601 Korean Hangul and Hanja: ISO-IR-149"
381 :short-name "KSC5601"
382 :long-name "KSC5601 (Korean): ISO-IR-149"
383 :iso-final-char ?C
384 :emacs-mule-id 147
385 :code-space [33 126 33 126]
386 :map "ksc5601-1987")
387
388(define-charset 'chinese-sisheng
389 "SiSheng characters for PinYin/ZhuYin"
390 :short-name "SiSheng"
391 :long-name "SiSheng (PinYin/ZhuYin)"
392 :iso-final-char ?0
393 :emacs-mule-id 160
394 :code-space [33 126]
395 :code-offset #x200000)
396
397(define-charset 'ipa
398 "IPA (International Phonetic Association)"
399 :short-name "IPA"
400 :long-name "IPA"
401 :iso-final-char ?0
402 :emacs-mule-id 161
403 :code-space [32 127]
404 :code-offset #x200080)
405
406(define-charset 'viscii
407 "VISCII1.1"
408 :short-name "VISCII"
409 :long-name "VISCII 1.1"
410 :code-space [0 255]
411 :map "viscii")
412
413(define-charset 'vietnamese-viscii-lower
414 "VISCII1.1 lower-case"
415 :short-name "VISCII lower"
416 :long-name "VISCII lower-case"
417 :iso-final-char ?1
418 :emacs-mule-id 162
419 :code-space [32 127]
65076506
KH
420 :code-offset #x200200
421 :unify-map "viscii-lower")
c0e17dd8
KH
422
423(define-charset 'vietnamese-viscii-upper
424 "VISCII1.1 upper-case"
425 :short-name "VISCII upper"
426 :long-name "VISCII upper-case"
427 :iso-final-char ?2
428 :emacs-mule-id 163
429 :code-space [32 127]
65076506
KH
430 :code-offset #x200280
431 :unify-map "viscii-upper")
c0e17dd8
KH
432
433(define-charset 'vscii
434 "VSCII1.1"
435 :short-name "VSCII"
436 :long-name "VSCII"
437 :code-space [0 255]
438 :map "vscii")
439
440(define-charset 'koi8-r
441 "KOI8-R"
442 :short-name "KOI8-R"
443 :long-name "KOI8-R"
444 :ascii-compatible-p t
445 :code-space [0 255]
446 :map "koi8-r")
447
448(define-charset-alias 'koi8 'koi8-r)
449
450(define-charset 'alternativnyj
451 "ALTERNATIVNYJ"
452 :short-name "alternativnyj"
453 :long-name "alternativnyj"
454 :ascii-compatible-p t
455 :code-space [0 255]
456 :map "ibm866")
007eef16 457(define-charset-alias 'cp866 'alternativnyj)
08a2119c 458(define-charset-alias 'ibm866 'alternativnyj)
08c19a27 459
6ef462e0
DL
460(define-charset 'koi8-u
461 "KOI8-U"
462 :short-name "KOI8-U"
463 :long-name "KOI8-U"
464 :ascii-compatible-p t
465 :code-space [0 255]
466 :map "koi8-u")
467
468(define-charset 'koi8-t
469 "KOI8-T"
470 :short-name "KOI8-T"
471 :long-name "KOI8-T"
472 :ascii-compatible-p t
473 :code-space [0 255]
474 :map "koi8-t")
475
476(define-charset 'georgian-ps
477 "GEORGIAN-PS"
478 :short-name "GEORGIAN-PS"
479 :long-name "GEORGIAN-PS"
480 :ascii-compatible-p t
481 :code-space [0 255]
482 :map "georgian-ps")
483
484(define-charset 'windows-1250
9fea1ee1 485 "WINDOWS-1250 (Central Europe)"
6ef462e0
DL
486 :short-name "WINDOWS-1250"
487 :long-name "WINDOWS-1250"
488 :ascii-compatible-p t
489 :code-space [0 255]
490 :map "windows-1250")
491(define-charset-alias 'cp1250 'windows-1250)
492
493(define-charset 'windows-1251
494 "WINDOWS-1251"
495 :short-name "WINDOWS-1251"
496 :long-name "WINDOWS-1251"
497 :ascii-compatible-p t
498 :code-space [0 255]
499 :map "windows-1251")
500(define-charset-alias 'cp1251 'windows-1251)
501
502(define-charset 'windows-1252
9fea1ee1 503 "WINDOWS-1252 (Greek)"
6ef462e0
DL
504 :short-name "WINDOWS-1252"
505 :long-name "WINDOWS-1252"
506 :ascii-compatible-p t
507 :code-space [0 255]
508 :map "windows-1252")
509(define-charset-alias 'cp1252 'windows-1252)
510
9fea1ee1
DL
511(define-charset 'windows-1253
512 "WINDOWS-1253"
513 :short-name "WINDOWS-1253"
514 :long-name "WINDOWS-1253"
515 :ascii-compatible-p t
516 :code-space [0 255]
517 :map "windows-1253")
518(define-charset-alias 'cp1253 'windows-1253)
519
520(define-charset 'windows-1254
521 "WINDOWS-1254"
522 :short-name "WINDOWS-1254"
523 :long-name "WINDOWS-1254"
524 :ascii-compatible-p t
525 :code-space [0 255]
526 :map "windows-1254")
527(define-charset-alias 'cp1254 'windows-1254)
528
529(define-charset 'windows-1255
530 "WINDOWS-1255 (Hebrew)"
531 :short-name "WINDOWS-1255"
532 :long-name "WINDOWS-1255"
533 :ascii-compatible-p t
534 :code-space [0 255]
535 :map "windows-1255")
536(define-charset-alias 'cp1255 'windows-1255)
537
538(define-charset 'windows-1256
539 "WINDOWS-1256 (Arabic)"
540 :short-name "WINDOWS-1256"
541 :long-name "WINDOWS-1256"
542 :ascii-compatible-p t
543 :code-space [0 255]
544 :map "windows-1256")
545(define-charset-alias 'cp1256 'windows-1256)
546
547(define-charset 'windows-1257
548 "WINDOWS-1257 (Baltic)"
549 :short-name "WINDOWS-1257"
550 :long-name "WINDOWS-1257"
551 :ascii-compatible-p t
552 :code-space [0 255]
553 :map "windows-1257")
554(define-charset-alias 'cp1257 'windows-1257)
555
556(define-charset 'windows-1258
557 "WINDOWS-1258"
558 :short-name "WINDOWS-1258"
559 :long-name "WINDOWS-1258"
560 :ascii-compatible-p t
561 :code-space [0 255]
562 :map "windows-1258")
563(define-charset-alias 'cp1258 'windows-1258)
564
565(define-charset 'next
566 "NEXT"
567 :short-name "NEXT"
568 :long-name "NEXT"
569 :ascii-compatible-p t
570 :code-space [0 255]
571 :map "next")
572
6ef462e0
DL
573(define-charset 'cp1125
574 "CP1125"
575 :short-name "CP1125"
576 :long-name "CP1125"
577 :code-space [0 255]
578 :map "cp1125")
579(define-charset-alias 'ruscii 'cp1125)
580;; Original name for cp1125, says Serhii Hlodin <hlodin@lutsk.bank.gov.ua>
581(define-charset-alias 'cp866u 'cp1125)
582
007eef16
DL
583(define-charset 'cp437
584 "CP437"
585 :short-name "CP437"
586 :long-name "CP437"
587 :code-space [0 255]
588 :ascii-compatible-p t
589 :map "cp437")
590
591(define-charset 'cp737
592 "CP737"
593 :short-name "CP737"
594 :long-name "CP737"
595 :code-space [0 255]
596 :ascii-compatible-p t
597 :map "cp737")
598
599(define-charset 'cp775
600 "CP775"
601 :short-name "CP775"
602 :long-name "CP775"
603 :code-space [0 255]
604 :ascii-compatible-p t
605 :map "cp775")
606
607(define-charset 'cp851
608 "CP851"
609 :short-name "CP851"
610 :long-name "CP851"
611 :code-space [0 255]
612 :ascii-compatible-p t
613 :map "cp851")
614
615(define-charset 'cp852
616 "CP852"
617 :short-name "CP852"
618 :long-name "CP852"
619 :code-space [0 255]
620 :ascii-compatible-p t
621 :map "cp852")
622
623(define-charset 'cp855
624 "CP855"
625 :short-name "CP855"
626 :long-name "CP855"
627 :code-space [0 255]
628 :ascii-compatible-p t
629 :map "cp855")
630
631(define-charset 'cp857
632 "CP857"
633 :short-name "CP857"
634 :long-name "CP857"
635 :code-space [0 255]
636 :ascii-compatible-p t
637 :map "cp857")
638
639(define-charset 'cp860
640 "CP860"
641 :short-name "CP860"
642 :long-name "CP860"
643 :code-space [0 255]
644 :ascii-compatible-p t
645 :map "cp860")
646
647(define-charset 'cp861
648 "CP861"
649 :short-name "CP861"
650 :long-name "CP861"
651 :code-space [0 255]
652 :ascii-compatible-p t
653 :map "cp861")
654
655(define-charset 'cp862
656 "CP862"
657 :short-name "CP862"
658 :long-name "CP862"
659 :code-space [0 255]
660 :ascii-compatible-p t
661 :map "cp862")
662
663(define-charset 'cp863
664 "CP863"
665 :short-name "CP863"
666 :long-name "CP863"
667 :code-space [0 255]
668 :ascii-compatible-p t
669 :map "cp863")
670
671(define-charset 'cp864
672 "CP864"
673 :short-name "CP864"
674 :long-name "CP864"
675 :code-space [0 255]
676 :ascii-compatible-p t
677 :map "cp864")
678
679(define-charset 'cp865
680 "CP865"
681 :short-name "CP865"
682 :long-name "CP865"
683 :code-space [0 255]
684 :ascii-compatible-p t
685 :map "cp865")
686
687(define-charset 'cp869
688 "CP869"
689 :short-name "CP869"
690 :long-name "CP869"
691 :code-space [0 255]
692 :ascii-compatible-p t
693 :map "cp869")
694
695(define-charset 'cp874
696 "CP874"
697 :short-name "CP874"
698 :long-name "CP874"
699 :code-space [0 255]
700 :ascii-compatible-p t
701 :map "cp874")
702
08c19a27
KH
703;; For Arabic, we need three different types of character sets.
704;; Digits are of direction left-to-right and of width 1-column.
705;; Others are of direction right-to-left and of width 1-column or
706;; 2-column.
c0e17dd8
KH
707(define-charset 'arabic-digit
708 "Arabic digit"
709 :short-name "Arabic digit"
710 :long-name "Arabic digit"
711 :iso-final-char ?2
712 :emacs-mule-id 164
713 :code-space [34 42]
714 :code-offset #x0600)
715
716(define-charset 'arabic-1-column
717 "Arabic 1-column"
718 :short-name "Arabic 1-col"
719 :long-name "Arabic 1-column"
720 :iso-final-char ?3
721 :emacs-mule-id 165
722 :code-space [33 126]
723 :code-offset #x200100)
724
725(define-charset 'arabic-2-column
726 "Arabic 2-column"
727 :short-name "Arabic 2-col"
728 :long-name "Arabic 2-column"
729 :iso-final-char ?4
730 :emacs-mule-id 224
731 :code-space [33 126]
732 :code-offset #x200180)
7153b1f1
KH
733
734;; Lao script.
c0e17dd8
KH
735;; Codes 0x21..0x7E are mapped to Unicode U+0E81..U+0EDF.
736(define-charset 'lao
737 "Lao characters (ISO10646 0E81..0EDF)"
738 :short-name "Lao"
739 :long-name "Lao"
740 :iso-final-char ?1
741 :emacs-mule-id 167
742 :code-space [33 126]
743 :code-offset #x0E81)
744
745(define-charset 'mule-lao
746 "Lao characters (ISO10646 0E81..0EDF)"
747 :short-name "Lao"
748 :long-name "Lao"
749 :code-space [0 255]
750 :parents '(ascii eight-bit-control (lao . -128)))
7153b1f1 751
08c19a27 752
7153b1f1
KH
753;; Indian scripts. Symbolic charset for data exchange. Glyphs are
754;; not assigned. They are automatically converted to each Indian
755;; script which IS-13194 supports.
756
c0e17dd8
KH
757(define-charset 'indian-is13194
758 "Generic Indian charset for data exchange with IS 13194"
759 :short-name "IS 13194"
760 :long-name "Indian IS 13194"
761 :iso-final-char ?5
762 :emacs-mule-id 225
763 :code-space [33 126]
764 :code-offset #x180000)
765
766(define-charset 'indian-glyph
767 "Glyphs for Indian characters."
768 :short-name "Indian glyph"
769 :long-name "Indian glyph"
770 :iso-final-char ?4
771 :emacs-mule-id 240
772 :code-space [32 127 32 127]
773 :code-offset #x180100)
7153b1f1
KH
774
775;; Actual Glyph for 1-column width.
c0e17dd8
KH
776(define-charset 'indian-1-column
777 "Indian charset for 1-column width glyphs"
778 :short-name "Indian 1-col"
779 :long-name "Indian 1 Column"
780 :iso-final-char ?6
781 :emacs-mule-id 240
782 :code-space [33 126 33 126]
783 :code-offset #x184000)
08c19a27 784
08c19a27 785;; Actual Glyph for 2-column width.
c0e17dd8
KH
786(define-charset 'indian-2-column
787 "Indian charset for 2-column width glyphs"
788 :short-name "Indian 2-col"
789 :long-name "Indian 2 Column"
790 :iso-final-char ?5
791 :emacs-mule-id 251
792 :code-space [33 126 33 126]
793 :parents '(indian-1-column))
794
795(define-charset 'tibetan
796 "Tibetan characters"
797 :iso-final-char ?7
798 :short-name "Tibetan 2-col"
24adcac1 799 :long-name "Tibetan 2 column"
c0e17dd8
KH
800 :iso-final-char ?7
801 :emacs-mule-id 252
802 :code-space [33 126 33 126]
803 :code-offset #x190000)
804
805(define-charset 'tibetan-1-column
806 "Tibetan 1 column glyph"
807 :short-name "Tibetan 1-col"
808 :long-name "Tibetan 1 column"
809 :iso-final-char ?8
810 :emacs-mule-id 241
811 :code-space [33 126 33 37]
812 :parents '(tibetan))
08c19a27 813
c0e17dd8
KH
814;; Subsets of Unicode.
815(define-charset 'mule-unicode-2500-33ff
816 "Unicode characters of the range U+2500..U+33FF."
817 :short-name "Unicode subset 2"
818 :long-name "Unicode subset (U+2500..U+33FF)"
819 :iso-final-char ?2
820 :emacs-mule-id 242
821 :code-space [#x20 #x7f #x20 #x47]
822 :code-offset #x2500)
823
824(define-charset 'mule-unicode-e000-ffff
825 "Unicode characters of the range U+E000..U+FFFF."
826 :short-name "Unicode subset 3"
827 :long-name "Unicode subset (U+E000+FFFF)"
828 :iso-final-char ?3
829 :emacs-mule-id 243
830 :code-space [#x20 #x7F #x20 #x75]
831 :code-offset #xE000)
832
833(define-charset 'mule-unicode-0100-24ff
834 "Unicode characters of the range U+0100..U+24FF."
835 :short-name "Unicode subset"
836 :long-name "Unicode subset (U+0100..U+24FF)"
837 :iso-final-char ?1
838 :emacs-mule-id 244
839 :code-space [#x20 #x7F #x20 #x7F]
840 :code-offset #x100)
841
842(define-charset 'ethiopic
24adcac1 843 "Ethiopic characters for Amharic and Tigrigna."
c0e17dd8
KH
844 :short-name "Ethiopic"
845 :long-name "Ethiopic characters"
846 :iso-final-char ?3
847 :emacs-mule-id 245
848 :code-space [33 126 33 126]
849 :code-offset #x1A0000)
850
851(define-charset 'mac-roman
852 "Mac Roman charset"
853 :short-name "Mac Roman"
854 :long-name "Mac Roman"
855 :ascii-compatible-p t
856 :code-space [0 255]
857 :map "mac-roman")
858
6ef462e0
DL
859;; Fixme: modern EBCDIC variants, e.g. IBM00924?
860(define-charset 'ebcdic-us
861 "US version of EBCDIC"
862 :short-name "EBCDIC-US"
863 :long-name "EBCDIC-US"
864 :code-space [0 255]
865 :mime-charset 'ebcdic-us
866 :map "ebcdic-us")
867
868(define-charset 'ebcdic-uk
869 "UK version of EBCDIC"
870 :short-name "EBCDIC-UK"
871 :long-name "EBCDIC-UK"
872 :code-space [0 255]
873 :mime-charset 'ebcdic-uk
874 :map "ebcdic-uk")
875
3803079c
DL
876(define-charset 'hp-roman8
877 "Encoding used by Hewlet-Packard printer software"
878 :short-name "HP-ROMAN8"
879 :long-name "HP-ROMAN8"
880 :ascii-compatible-p t
881 :code-space [0 255]
882 :map "hp-roman8")
883
884(define-charset 'adobe-standard-encoding
885 "Adobe `standard encoding' used in PostScript"
886 :short-name "ADOBE-STANDARD-ENCODING"
887 :long-name "ADOBE-STANDARD-ENCODING"
6584daf1 888 :code-space [#x20 255]
3803079c
DL
889 :map "stdenc")
890
891(define-charset 'symbol
892 "Adobe symbol encoding used in PostScript"
893 :short-name "ADOBE-SYMBOL"
894 :long-name "ADOBE-SYMBOL"
6584daf1 895 :code-space [#x20 255]
3803079c
DL
896 :map "symbol")
897
898(define-charset 'ibm850
899 "DOS codepage 850"
900 :short-name "IBM850"
901 :long-name "IBM850"
6584daf1 902 :ascii-compatible-p t
3803079c
DL
903 :code-space [0 255]
904 :map "ibm850")
905(define-charset-alias 'cp850 'ibm850)
906
c0e17dd8 907(unify-charset 'chinese-gb2312)
7c9e1024 908(unify-charset 'chinese-gbk)
c0e17dd8
KH
909(unify-charset 'chinese-cns11643-1)
910(unify-charset 'chinese-cns11643-2)
911(unify-charset 'big5)
912(unify-charset 'chinese-big5-1)
913(unify-charset 'chinese-big5-2)
65076506
KH
914(unify-charset 'vietnamese-viscii-lower)
915(unify-charset 'vietnamese-viscii-upper)
916
85f789f7 917\f
d2a1ee18
KH
918;; These are tables for translating characters on decoding and
919;; encoding.
c0e17dd8 920(setq standard-translation-table-for-decode nil)
08c19a27 921
f967223b 922(setq standard-translation-table-for-encode nil)
08c19a27 923
bdf74bef
DL
924(defvar translation-table-for-input nil
925 "If non-nil, a char table used to translate characters from input methods.
926\(Currently only used by Quail.)")
08c19a27
KH
927\f
928;;; Make fundamental coding systems.
929
c0e17dd8
KH
930;; The coding system `no-conversion' is already defined in coding.c as
931;; below:
932;;
933;; (define-coding-system 'no-conversion
934;; "Do no conversion."
935;; :coding-type 'raw-text
936;; :mnemonic ?=)
08c19a27 937
c0e17dd8
KH
938(define-coding-system 'raw-text
939 "Raw text, which means text contains random 8-bit codes.
940Encoding text with this coding system produces the actual byte
941sequence of the text in buffers and strings. An exception is made for
942eight-bit-control characters. Each of them is encoded into a single
943byte.
bc6a0946
KH
944
945When you visit a file with this coding, the file is read into a
c0e17dd8
KH
946unibyte buffer as is (except for EOL format), thus each byte of a file
947is treated as a character."
948 :coding-type 'raw-text
949 :mnemonic ?t)
950
951(define-coding-system 'undecided
952 "No conversion on encoding, automatic conversion on decoding"
953 :coding-type 'undecided
954 :mnemonic ?-
955 :charset-list '(ascii))
08c19a27 956
8d969bf6 957(define-coding-system-alias 'unix 'undecided-unix)
1c445211
RS
958(define-coding-system-alias 'dos 'undecided-dos)
959(define-coding-system-alias 'mac 'undecided-mac)
960
c0e17dd8
KH
961(define-coding-system 'iso-latin-1
962 "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)."
963 :coding-type 'iso-2022
964 :mnemonic ?1
965 :charset-list '(ascii latin-iso8859-1)
966 :designation [ascii latin-iso8859-1 nil nil]
967 :mime-charset 'iso-8859-1)
bc6a0946 968
c0e17dd8
KH
969(define-coding-system-alias 'iso-8859-1 'iso-latin-1)
970(define-coding-system-alias 'latin-1 'iso-latin-1)
08c19a27 971
c0e17dd8 972;; Coding systems not specific to each language environment.
bc6a0946 973
c0e17dd8
KH
974(define-coding-system 'emacs-mule
975 "Emacs 21 internal format used in buffer and string."
976 :coding-type 'emacs-mule
7e8b4d67 977 :charset-list 'emacs-mule
c0e17dd8
KH
978 :mnemonic ?M)
979
980(define-coding-system 'utf-8
981 "UTF-8."
982 :coding-type 'utf-8
983 :mnemonic ?U
984 :charset-list '(unicode))
985
986(define-coding-system-alias 'mule-utf-8 'utf-8)
987
988(define-coding-system 'utf-8-emacs
26dbea99 989 "Support for all Emacs characters (including non-Unicode characters)."
c0e17dd8
KH
990 :coding-type 'utf-8
991 :mnemonic ?U
ebc563df
DL
992 :charset-list '(emacs)
993 :mime-charset 'utf-8)
c0e17dd8
KH
994
995(define-coding-system 'utf-16
996 "UTF-16"
997 :coding-type 'utf-16
998 :mnemonic ?U
ebc563df
DL
999 :charset-list '(unicode)
1000 :mime-charset 'utf-16)
c0e17dd8
KH
1001
1002(define-coding-system 'utf-16-le-nosig
1003 "UTF-16, little endian, no signature"
1004 :coding-type 'utf-16
1005 :mnemonic ?U
1006 :charset-list '(unicode)
1007 :endian 'little)
1008
1009(define-coding-system 'utf-16-be-nosig
1010 "UTF-16, big endian, no signature"
1011 :coding-type 'utf-16
1012 :mnemonic ?U
1013 :charset-list '(unicode)
1014 :endian 'big)
1015
1016(define-coding-system 'utf-16-le
1017 "UTF-16, little endian, with signature"
1018 :coding-type 'utf-16
1019 :mnemonic ?U
1020 :charset-list '(unicode)
a44cf41b 1021 :bom t
ebc563df
DL
1022 :endian 'little
1023 :mime-charset 'utf-16-le)
c0e17dd8
KH
1024
1025(define-coding-system 'utf-16-be
1026 "UTF-16, big endian, with signature"
1027 :coding-type 'utf-16
1028 :mnemonic ?U
1029 :charset-list '(unicode)
a44cf41b 1030 :bom t
ebc563df
DL
1031 :endian 'big
1032 :mime-charset 'utf-16-be)
c0e17dd8
KH
1033
1034(define-coding-system 'iso-2022-7bit
1035 "ISO 2022 based 7-bit encoding using only G0"
1036 :coding-type 'iso-2022
1037 :mnemonic ?J
1038 :charset-list 'iso-2022
1039 :designation [(ascii t) nil nil nil]
1040 :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation composition))
1041
1042(define-coding-system 'iso-2022-7bit-ss2
1043 "ISO 2022 based 7-bit encoding using SS2 for 96-charset"
1044 :coding-type 'iso-2022
1045 :mnemonic ?$
1046 :charset-list 'iso-2022
1047 :designation [(ascii 94) nil (nil 96) nil]
1048 :flags '(short ascii-at-eol ascii-at-cntl 7-bit
1049 designation single-shift composition))
1050
1051(define-coding-system 'iso-2022-7bit-lock
1052 "ISO-2022 coding system using Locking-Shift for 96-charset"
1053 :coding-type 'iso-2022
1054 :mnemonic ?&
1055 :charset-list 'iso-2022
1056 :designation [(ascii 94) (nil 96) nil nil]
1057 :flags '(ascii-at-eol ascii-at-cntl 7-bit
1058 designation locking-shift composition))
4951a271 1059
2e21aa27 1060(define-coding-system-alias 'iso-2022-int-1 'iso-2022-7bit-lock)
08c19a27 1061
c0e17dd8
KH
1062(define-coding-system 'iso-2022-7bit-lock-ss2
1063 "Mixture of ISO-2022-JP, ISO-2022-KR, and ISO-2022-CN"
1064 :coding-type 'iso-2022
1065 :mnemonic ?i
1066 :charset-list '(ascii
1067 japanese-jisx0208 japanese-jisx0208-1978 latin-jisx0201
1068 korean-ksc5601
1069 chinese-gb2312
1070 chinese-cns11643-1 chinese-cns11643-2 chinese-cns11643-3
1071 chinese-cns11643-4 chinese-cns11643-5 chinese-cns11643-6
1072 chinese-cns11643-7)
1073 :designation [(ascii 94)
1074 (nil korean-ksc5601 chinese-gb2312 chinese-cns11643-1 96)
1075 (nil chinese-cns11643-2)
1076 (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
1077 chinese-cns11643-6 chinese-cns11643-7)]
1078 :flags '(short ascii-at-eol ascii-at-cntl 7-bit locking-shift
1079 single-shift init-bol))
08c19a27 1080
2e21aa27 1081(define-coding-system-alias 'iso-2022-cjk 'iso-2022-7bit-lock-ss2)
08c19a27 1082
c0e17dd8
KH
1083(define-coding-system 'iso-2022-8bit-ss2
1084 "ISO 2022 based 8-bit encoding using SS2 for 96-charset"
1085 :coding-type 'iso-2022
1086 :mnemonic ?@
1087 :charset-list 'iso-2022
1088 :designation [(ascii 94) nil (nil 96) nil]
1089 :flags '(ascii-at-eol ascii-at-cntl designation single-shift composition))
08c19a27 1090
c0e17dd8
KH
1091(define-coding-system 'compound-text
1092 "Compound text based generic encoding for decoding unknown messages.
73066974
EZ
1093
1094This coding system does not support ICCCM Extended Segments."
c0e17dd8
KH
1095 :coding-type 'iso-2022
1096 :mnemonic ?x
1097 :charset-list 'iso-2022
1098 :designation [(ascii 94) (latin-iso8859-1 katakana-jisx0201 96) nil nil]
1099 :flags '(ascii-at-eol ascii-at-cntl
1100 designation locking-shift single-shift composition)
ebc563df
DL
1101 ;; Fixme: this isn't a valid MIME charset and has to be
1102 ;; special-cased elsewhere -- fx
c0e17dd8 1103 :mime-charset 'x-ctext)
d49a4835 1104
cb5be6c9
EZ
1105(define-coding-system-alias 'x-ctext 'compound-text)
1106(define-coding-system-alias 'ctext 'compound-text)
73066974 1107
cb5be6c9
EZ
1108;; Same as compound-text, but doesn't produce composition escape
1109;; sequences. Used in post-read and pre-write conversions of
1110;; compound-text-with-extensions, see mule.el. Note that this should
1111;; not have a mime-charset property, to prevent it from showing up
1112;; close to the beginning of coding systems ordered by priority.
c0e17dd8 1113(define-coding-system 'ctext-no-compositions 2 ?x
73066974
EZ
1114 "Compound text based generic encoding for decoding unknown messages.
1115
cb5be6c9 1116Like `compound-text', but does not produce escape sequences for compositions."
c0e17dd8
KH
1117 :coding-type 'iso-2022
1118 :mnemonic ?x
1119 :charset-list 'iso-2022
1120 :designation [(ascii 94) (latin-iso8859-1 katakana-jisx0201 96) nil nil]
1121 :flags '(ascii-at-eol ascii-at-cntl
1122 designation locking-shift single-shift))
1123
1124(define-coding-system 'compound-text-with-extensions
73066974
EZ
1125 "Compound text encoding with ICCCM Extended Segment extensions.
1126
1127This coding system should be used only for X selections. It is inappropriate
1128for decoding and encoding files, process I/O, etc."
c0e17dd8
KH
1129 :coding-type 'raw-text
1130 :mnemonic ?x
1131 :post-read-conversion 'ctext-post-read-conversion
1132 :pre-write-conversion 'ctext-pre-write-conversion)
73066974 1133
cb5be6c9
EZ
1134(define-coding-system-alias
1135 'x-ctext-with-extensions 'compound-text-with-extensions)
1136(define-coding-system-alias
1137 'ctext-with-extensions 'compound-text-with-extensions)
75b6fb58 1138
c0e17dd8
KH
1139(define-coding-system 'us-ascii
1140 "Convert all characters but ASCII to `?'."
1141 :coding-type 'charset
1142 :mnemonic ?-
1143 :charset-list '(ascii)
1144 :default-char ??
1145 :mime-charset 'us-ascii)
1146
1147(define-coding-system-alias 'iso-safe 'us-ascii)
f6eb8ace 1148
c0e17dd8 1149;; Use us-ascii for terminal output if some other coding system is not
e8dd0160 1150;; specified explicitly.
c0e17dd8 1151(set-safe-terminal-coding-system-internal 'us-ascii)
f6eb8ace 1152
08c19a27 1153;; The other coding-systems are defined in each language specific
c0e17dd8 1154;; files under lisp/language.
08c19a27 1155
678dc7ec
RS
1156;; Normally, set coding system to `undecided' before reading a file.
1157;; Compiled Emacs Lisp files (*.elc) are not decoded at all,
1158;; but we regard them as containing multibyte characters.
1159;; Tar files are not decoded at all, but we treat them as raw bytes.
08c19a27 1160
4951a271 1161(setq file-coding-system-alist
2238f751 1162 '(("\\.elc\\'" . (emacs-mule . emacs-mule))
bdf74bef 1163 ("\\.utf\\(-8\\)?\\'" . utf-8)
3803079c
DL
1164 ;; This is the defined default for XML documents. It may be
1165 ;; overridden by a charset specification in the header. That
1166 ;; should be grokked by the auto-coding mechanism, but rms
1167 ;; vetoed that. -- fx
1168 ("\\.xml\\'" . utf-8)
3e88bb50
EZ
1169 ;; We use raw-text for reading loaddefs.el so that if it
1170 ;; happens to have DOS or Mac EOLs, they are converted to
1171 ;; newlines. This is required to make the special treatment
1172 ;; of the "\ newline" combination in loaddefs.el, which marks
1173 ;; the beginning of a doc string, work.
1174 ("\\(\\`\\|/\\)loaddefs.el\\'" . (raw-text . raw-text-unix))
2238f751 1175 ("\\.tar\\'" . (no-conversion . no-conversion))
4951a271 1176 ("" . (undecided . nil))))
08c19a27
KH
1177
1178\f
1179;;; Setting coding categories and their priorities.
1180
1181;; This setting is just to read an Emacs Lisp source files which
1182;; contain multilingual text while dumping Emacs. More appropriate
2792ce16 1183;; values are set by the command `set-language-environment' for each
08c19a27
KH
1184;; language environment.
1185
c0e17dd8
KH
1186(set-coding-system-priority
1187 'iso-latin-1
1188 'utf-8
1189 'iso-2022-7bit
1190 )
08c19a27 1191
c1b628eb
KH
1192\f
1193;;; Miscellaneous settings.
c1b628eb 1194
c0e17dd8
KH
1195;; Make all multibyte characters self-insert.
1196(set-char-table-range (nth 1 global-map)
007eef16 1197 (cons 128 (max-char))
c0e17dd8
KH
1198 'self-insert-command)
1199
1200(aset latin-extra-code-table ?\222 t)
4cb4b388 1201
6820ed3f
DL
1202;; The old code-pages library is obsoleted by coding systems based on
1203;; the charsets defined in this file but might be required by user
1204;; code.
1205(provide 'code-pages)
1206
3803079c
DL
1207;; Local variables:
1208;; no-byte-compile: t
1209;; End:
1210
08c19a27 1211;;; mule-conf.el ends here