]> code.delx.au - gnu-emacs/blob - lisp/international/mule-conf.el
*** empty log message ***
[gnu-emacs] / lisp / international / mule-conf.el
1 ;;; mule-conf.el --- configure multilingual environment
2
3 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 2001, 2002
6 ;; National Institute of Advanced Industrial Science and Technology (AIST)
7 ;; Registration Number H13PRO009
8 ;; Copyright (C) 2002, 2003 Free Software Foundation, Inc.
9
10 ;; Keywords: i18n, mule, multilingual, character set, coding system
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
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.
34
35 ;;; Code:
36
37 ;;; Remarks
38
39 ;; The ISO-IR registry is at http://www.itscj.ipsj.or.jp/ISO-IR/.
40 ;; Standards docs equivalent to iso-2022 and iso-8859 are at
41 ;; http://www.ecma.ch/.
42
43 ;; FWIW, http://www.microsoft.com/globaldev/ lists the following for
44 ;; MS Windows, which are presumably the only charsets we really need
45 ;; to worry about on such systems:
46 ;; `OEM codepages': 437, 720, 737, 775, 850, 852, 855, 857, 858, 862, 866
47 ;; `Windows codepages': 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257,
48 ;; 1258, 874, 932, 936, 949, 950
49
50 ;;; Definitions of character sets.
51
52 ;; The charsets `ascii', `unicode' and `eight-bit' are already defined
53 ;; in charset.c as below:
54 ;;
55 ;; (define-charset 'ascii
56 ;; ""
57 ;; :dimension 1
58 ;; :code-space [0 127]
59 ;; :iso-final-char ?B
60 ;; :ascii-compatible-p t
61 ;; :emacs-mule-id 0
62 ;; :code-offset 0)
63 ;;
64 ;; (define-charset 'unicode
65 ;; ""
66 ;; :dimension 3
67 ;; :code-space [0 255 0 255 0 16]
68 ;; :ascii-compatible-p t
69 ;; :code-offset 0)
70 ;;
71 ;; (define-charset 'eight-bit
72 ;; ""
73 ;; :dimension 1
74 ;; :code-space [128 255]
75 ;; :code-offset #x3FFF80)
76 ;;
77 ;; We now set :docstring, :short-name, and :long-name properties.
78
79 (put-charset-property
80 'ascii :docstring "ASCII (ISO646 IRV)")
81 (put-charset-property
82 'ascii :short-name "ASCII")
83 (put-charset-property
84 'ascii :long-name "ASCII (ISO646 IRV)")
85 (put-charset-property
86 'iso-8859-1 :docstring "Latin-1 (ISO/IEC 8859-1)")
87 (put-charset-property
88 'iso-8859-1 :short-name "Latin-1")
89 (put-charset-property
90 'iso-8859-1 :long-name "Latin-1")
91 (put-charset-property
92 'unicode :docstring "Unicode (ISO10646)")
93 (put-charset-property
94 'unicode :short-name "Unicode")
95 (put-charset-property
96 'unicode :long-name "Unicode (ISO10646)")
97 (put-charset-property 'eight-bit :docstring "Raw bytes 0-255")
98 (put-charset-property 'eight-bit :short-name "Raw bytes")
99
100 (define-charset-alias 'ucs 'unicode)
101
102 (define-charset 'emacs
103 "Full Emacs characters"
104 :ascii-compatible-p t
105 :code-space [ 0 255 0 255 0 63 ]
106 :code-offset 0
107 :supplementary-p t)
108
109 (define-charset 'latin-iso8859-1
110 "Right-Hand Part of ISO/IEC 8859/1 (Latin-1): ISO-IR-100"
111 :short-name "RHP of Latin-1"
112 :long-name "RHP of ISO/IEC 8859/1 (Latin-1): ISO-IR-100"
113 :iso-final-char ?A
114 :emacs-mule-id 129
115 :code-space [32 127]
116 :code-offset 160)
117
118 ;; Name perhaps not ideal, but is XEmacs-compatible.
119 (define-charset 'control-1
120 "8-bit control code (0x80..0x9F)"
121 :short-name "8-bit control code"
122 :code-space [128 159]
123 :code-offset 128)
124
125 (define-charset 'eight-bit-control
126 "Raw bytes in the range 0x80..0x9F (usually produced from invalid encodings)"
127 :short-name "Raw bytes 0x80..0x9F"
128 :code-space [128 159]
129 :code-offset #x3FFF80) ; see character.h
130
131 (define-charset 'eight-bit-graphic
132 "Raw bytes in the range 0xA0..0xFF (usually produced from invalid encodings)"
133 :short-name "Raw bytes 0xA0..0xFF"
134 :code-space [160 255]
135 :code-offset #x3FFFA0) ; see character.h
136
137 (defmacro define-iso-single-byte-charset (symbol iso-symbol name nickname
138 iso-ir iso-final
139 emacs-mule-id map)
140 `(progn
141 (define-charset ,symbol
142 ,name
143 :short-name ,nickname
144 :long-name ,name
145 :ascii-compatible-p t
146 :code-space [0 255]
147 :map ,map)
148 (if ,iso-symbol
149 (define-charset ,iso-symbol
150 (if ,iso-ir
151 (format "Right-Hand Part of %s (%s): ISO-IR-%d"
152 ,name ,nickname ,iso-ir)
153 (format "Right-Hand Part of %s (%s)" ,name ,nickname))
154 :short-name (format "RHP of %s" ,name)
155 :long-name (format "RHP of %s (%s)" ,name ,nickname)
156 :iso-final-char ,iso-final
157 :emacs-mule-id ,emacs-mule-id
158 :code-space [32 127]
159 :subset (list ,symbol 160 255 -128)))))
160
161 (define-iso-single-byte-charset 'iso-8859-2 'latin-iso8859-2
162 "ISO/IEC 8859/2" "Latin-2" 101 ?B 130 "8859-2")
163
164 (define-iso-single-byte-charset 'iso-8859-3 'latin-iso8859-3
165 "ISO/IEC 8859/3" "Latin-3" 109 ?C 131 "8859-3")
166
167 (define-iso-single-byte-charset 'iso-8859-4 'latin-iso8859-4
168 "ISO/IEC 8859/4" "Latin-4" 110 ?D 132 "8859-4")
169
170 (define-iso-single-byte-charset 'iso-8859-5 'cyrillic-iso8859-5
171 "ISO/IEC 8859/5" "Latin/Cyrillic" 144 ?L 140 "8859-5")
172
173 (define-iso-single-byte-charset 'iso-8859-6 'arabic-iso8859-6
174 "ISO/IEC 8859/6" "Latin/Arabic" 127 ?G 135 "8859-6")
175
176 (define-iso-single-byte-charset 'iso-8859-7 'greek-iso8859-7
177 "ISO/IEC 8859/7" "Latin/Greek" 126 ?F 134 "8859-7")
178
179 (define-iso-single-byte-charset 'iso-8859-8 'hebrew-iso8859-8
180 "ISO/IEC 8859/8" "Latin/Hebrew" 138 ?H 136 "8859-8")
181
182 (define-iso-single-byte-charset 'iso-8859-9 'latin-iso8859-9
183 "ISO/IEC 8859/9" "Latin-5" 148 ?M 141 "8859-9")
184
185 (define-iso-single-byte-charset 'iso-8859-10 'latin-iso8859-10
186 "ISO/IEC 8859/10" "Latin-6" 157 ?V nil "8859-10")
187
188 ;; http://www.nectec.or.th/it-standards/iso8859-11/
189 ;; http://www.cwi.nl/~dik/english/codes/8859.html says this is tis-620
190 ;; plus nbsp
191 (define-iso-single-byte-charset 'iso-8859-11 'thai-iso8859-11
192 "ISO/IEC 8859/11" "Latin/Thai" 166 ?T nil "8859-11")
193
194 ;; 8859-12 doesn't (yet?) exist.
195
196 (define-iso-single-byte-charset 'iso-8859-13 'latin-iso8859-13
197 "ISO/IEC 8859/13" "Latin-7" 179 ?Y nil "8859-13")
198
199 (define-iso-single-byte-charset 'iso-8859-14 'latin-iso8859-14
200 "ISO/IEC 8859/14" "Latin-8" 199 ?_ 143 "8859-14")
201
202 (define-iso-single-byte-charset 'iso-8859-15 'latin-iso8859-15
203 "ISO/IEC 8859/15" "Latin-9" 203 ?b 142 "8859-15")
204
205 (define-iso-single-byte-charset 'iso-8859-16 'latin-iso8859-16
206 "ISO/IEC 8859/16" "Latin-10" 226 ?f nil "8859-16")
207
208 ;; No point in keeping it around.
209 (fmakunbound 'define-iso-single-byte-charset)
210
211 ;; Can this be shared with 8859-11?
212 ;; N.b. not all of these are defined unicodes.
213 (define-charset 'thai-tis620
214 "TIS620.2533"
215 :short-name "TIS620.2533"
216 :iso-final-char ?T
217 :emacs-mule-id 133
218 :code-space [32 127]
219 :code-offset #x0E00)
220
221 ;; Fixme: doc for this, c.f. above
222 (define-charset 'tis620-2533
223 "TIS620.2533"
224 :short-name "TIS620.2533"
225 :ascii-compatible-p t
226 :code-space [0 255]
227 :superset '(ascii eight-bit-control (thai-tis620 . 128)))
228
229 (define-charset 'jisx0201
230 "JISX0201"
231 :short-name "JISX0201"
232 :code-space [33 254]
233 :map "jisx0201")
234
235 (define-charset 'latin-jisx0201
236 "Roman Part of JISX0201.1976"
237 :short-name "JISX0201 Roman"
238 :long-name "Japanese Roman (JISX0201.1976)"
239 :iso-final-char ?J
240 :emacs-mule-id 138
241 :code-space [33 126]
242 :subset '(jisx0201 33 126 0))
243
244 (define-charset 'katakana-jisx0201
245 "Katakana Part of JISX0201.1976"
246 :short-name "JISX0201 Katakana"
247 :long-name "Japanese Katakana (JISX0201.1976)"
248 :iso-final-char ?I
249 :emacs-mule-id 137
250 :code-space [33 126]
251 :subset '(jisx0201 161 254 -128))
252
253 (define-charset 'chinese-gb2312
254 "GB2312 Chinese simplified: ISO-IR-58"
255 :short-name "GB2312"
256 :long-name "GB2312: ISO-IR-58"
257 :iso-final-char ?A
258 :emacs-mule-id 145
259 :code-space [33 126 33 126]
260 :code-offset #x110000
261 :unify-map "gb2312-1980")
262
263 (define-charset 'chinese-gbk
264 "GBK Chinese simplified."
265 :short-name "GBK"
266 :code-space [#x40 #xFE #x81 #xFE]
267 :code-offset #x160000
268 :unify-map "gbk")
269 (define-charset-alias 'cp936 'chinese-gbk)
270 (define-charset-alias 'windows-936 'chinese-gbk)
271
272 (define-charset 'chinese-cns11643-1
273 "CNS11643 Plane 1 Chinese traditional: ISO-IR-171"
274 :short-name "CNS11643-1"
275 :long-name "CNS11643-1 (Chinese traditional): ISO-IR-171"
276 :iso-final-char ?G
277 :emacs-mule-id 149
278 :code-space [33 126 33 126]
279 :code-offset #x114000
280 :unify-map "cns11643-1")
281
282 (define-charset 'chinese-cns11643-2
283 "CNS11643 Plane 2 Chinese traditional: ISO-IR-172"
284 :short-name "CNS11643-2"
285 :long-name "CNS11643-2 (Chinese traditional): ISO-IR-172"
286 :iso-final-char ?H
287 :emacs-mule-id 150
288 :code-space [33 126 33 126]
289 :code-offset #x118000
290 :unify-map "cns11643-2")
291
292 (define-charset 'chinese-cns11643-3
293 "CNS11643 Plane 3 Chinese Traditional: ISO-IR-183"
294 :short-name "CNS11643-3"
295 :long-name "CNS11643-3 (Chinese traditional): ISO-IR-183"
296 :iso-final-char ?I
297 :code-space [33 126 33 126]
298 :emacs-mule-id 246
299 :code-offset #x11C000)
300
301 (define-charset 'chinese-cns11643-4
302 "CNS11643 Plane 4 Chinese Traditional: ISO-IR-184"
303 :short-name "CNS11643-4"
304 :long-name "CNS11643-4 (Chinese traditional): ISO-IR-184"
305 :iso-final-char ?J
306 :emacs-mule-id 247
307 :code-space [33 126 33 126]
308 :code-offset #x120000)
309
310 (define-charset 'chinese-cns11643-5
311 "CNS11643 Plane 5 Chinese Traditional: ISO-IR-185"
312 :short-name "CNS11643-5"
313 :long-name "CNS11643-5 (Chinese traditional): ISO-IR-185"
314 :iso-final-char ?K
315 :emacs-mule-id 248
316 :code-space [33 126 33 126]
317 :code-offset #x124000)
318
319 (define-charset 'chinese-cns11643-6
320 "CNS11643 Plane 6 Chinese Traditional: ISO-IR-186"
321 :short-name "CNS11643-6"
322 :long-name "CNS11643-6 (Chinese traditional): ISO-IR-186"
323 :iso-final-char ?L
324 :emacs-mule-id 249
325 :code-space [33 126 33 126]
326 :code-offset #x128000)
327
328 (define-charset 'chinese-cns11643-7
329 "CNS11643 Plane 7 Chinese Traditional: ISO-IR-187"
330 :short-name "CNS11643-7"
331 :long-name "CNS11643-7 (Chinese traditional): ISO-IR-187"
332 :iso-final-char ?M
333 :emacs-mule-id 250
334 :code-space [33 126 33 126]
335 :code-offset #x12C000)
336
337 (define-charset 'big5
338 "Big5 (Chinese traditional)"
339 :short-name "Big5"
340 :code-space [#x40 #xFE #xA1 #xFE]
341 :code-offset #x130000
342 :unify-map "big5")
343 ;; Fixme: AKA cp950 according to
344 ;; <URL:http://www.microsoft.com/globaldev/reference/WinCP.asp>. Is
345 ;; that correct?
346
347 (define-charset 'chinese-big5-1
348 "Frequently used part (A141-C67E) of Big5 (Chinese traditional)"
349 :short-name "Big5 (Level-1)"
350 :long-name "Big5 (Level-1) A141-C67F"
351 :iso-final-char ?0
352 :emacs-mule-id 152
353 :code-space [#x21 #x7E #x21 #x7E]
354 :code-offset #x135000
355 :unify-map "big5-1")
356
357 (define-charset 'chinese-big5-2
358 "Less frequently used part (C940-FEFE) of Big5 (Chinese traditional)"
359 :short-name "Big5 (Level-2)"
360 :long-name "Big5 (Level-2) C940-FEFE"
361 :iso-final-char ?1
362 :emacs-mule-id 153
363 :code-space [#x21 #x7E #x21 #x7E]
364 :code-offset #x137800
365 :unify-map "big5-2")
366
367 (define-charset 'japanese-jisx0208
368 "JISX0208.1983/1990 Japanese Kanji: ISO-IR-87"
369 :short-name "JISX0208"
370 :long-name "JISX0208.1983/1990 (Japanese): ISO-IR-87"
371 :iso-final-char ?B
372 :emacs-mule-id 146
373 :code-space [33 126 33 126]
374 :code-offset #x140000
375 :unify-map "jisx0208-1990")
376
377 (define-charset 'japanese-jisx0208-1978
378 "JISX0208.1978 Japanese Kanji (so called \"old JIS\"): ISO-IR-42"
379 :short-name "JISX0208.1978"
380 :long-name "JISX0208.1978 (Japanese): ISO-IR-42"
381 :iso-final-char ?@
382 :emacs-mule-id 144
383 :code-space [33 126 33 126]
384 :code-offset #x144000
385 :unify-map "jisx0208-1978")
386
387 (define-charset 'japanese-jisx0212
388 "JISX0212 Japanese supplement: ISO-IR-159"
389 :short-name "JISX0212"
390 :long-name "JISX0212 (Japanese): ISO-IR-159"
391 :iso-final-char ?D
392 :emacs-mule-id 148
393 :code-space [33 126 33 126]
394 :code-offset #x148000
395 :unify-map "jisx0212-1990")
396
397 ;; Note that jisx0213 contains characters not in Unicode (3.2?). It's
398 ;; arguable whether it should have a unify-map.
399 (define-charset 'japanese-jisx0213-1
400 "JISX0213 Plane 1 (Japanese)"
401 :short-name "JISX0213-1"
402 :iso-final-char ?O
403 :emacs-mule-id 151
404 :unify-map "jisx0213-1"
405 :code-space [33 126 33 126]
406 :code-offset #x14C000)
407
408 (define-charset 'japanese-jisx0213-2
409 "JISX0213 Plane 2 (Japanese)"
410 :short-name "JISX0213-2"
411 :iso-final-char ?P
412 :emacs-mule-id 254
413 :unify-map "jisx0213-2"
414 :code-space [33 126 33 126]
415 :code-offset #x150000)
416
417 (define-charset 'korean-ksc5601
418 "KSC5601 Korean Hangul and Hanja: ISO-IR-149"
419 :short-name "KSC5601"
420 :long-name "KSC5601 (Korean): ISO-IR-149"
421 :iso-final-char ?C
422 :emacs-mule-id 147
423 :code-space [33 126 33 126]
424 :code-offset #x279f94 ; ... #x27c217
425 :unify-map "ksc5601-1987")
426
427 (define-charset 'big5-hkscs
428 "Big5-HKSCS (Chinese traditional, Hong Kong supplement)"
429 :short-name "Big5"
430 :code-space [#x40 #xFE #xA1 #xFE]
431 :code-offset #x27c218 ; ... #x280839
432 :unify-map "big5-hkscs")
433
434 ;; Fixme: Korean cp949/UHC
435
436 (define-charset 'chinese-sisheng
437 "SiSheng characters for PinYin/ZhuYin"
438 :short-name "SiSheng"
439 :long-name "SiSheng (PinYin/ZhuYin)"
440 :iso-final-char ?0
441 :emacs-mule-id 160
442 :code-space [33 126]
443 :unify-map "sisheng"
444 :code-offset #x200000)
445
446 ;; A subset of the 1989 version of IPA. It consists of the consonant
447 ;; signs used in English, French, German and Italian, and all vowels
448 ;; signs in the table. [says old MULE doc]
449 (define-charset 'ipa
450 "IPA (International Phonetic Association)"
451 :short-name "IPA"
452 :iso-final-char ?0
453 :emacs-mule-id 161
454 :unify-map "ipa"
455 :code-space [32 127]
456 :code-offset #x200080)
457
458 (define-charset 'viscii
459 "VISCII1.1"
460 :short-name "VISCII"
461 :long-name "VISCII 1.1"
462 :code-space [0 255]
463 :map "viscii")
464
465 (define-charset 'vietnamese-viscii-lower
466 "VISCII1.1 lower-case"
467 :short-name "VISCII lower"
468 :long-name "VISCII lower-case"
469 :iso-final-char ?1
470 :emacs-mule-id 162
471 :code-space [32 127]
472 :code-offset #x200200
473 :unify-map "viscii-lower")
474
475 (define-charset 'vietnamese-viscii-upper
476 "VISCII1.1 upper-case"
477 :short-name "VISCII upper"
478 :long-name "VISCII upper-case"
479 :iso-final-char ?2
480 :emacs-mule-id 163
481 :code-space [32 127]
482 :code-offset #x200280
483 :unify-map "viscii-upper")
484
485 (define-charset 'vscii
486 "VSCII1.1"
487 :short-name "VSCII"
488 :code-space [0 255]
489 :map "vscii")
490
491 ;; Fixme: see note in tcvn.map about combining characters
492 (define-charset 'tcvn-5712
493 "TCVN-5712"
494 :code-space [0 255]
495 :map "tcvn")
496
497 (define-charset 'koi8-r
498 "KOI8-R"
499 :short-name "KOI8-R"
500 :ascii-compatible-p t
501 :code-space [0 255]
502 :map "koi8-r")
503
504 (define-charset-alias 'koi8 'koi8-r)
505
506 (define-charset 'alternativnyj
507 "ALTERNATIVNYJ"
508 :short-name "alternativnyj"
509 :ascii-compatible-p t
510 :code-space [0 255]
511 :map "alternativnyj")
512
513 (define-charset 'cp866
514 "CP866"
515 :short-name "cp866"
516 :ascii-compatible-p t
517 :code-space [0 255]
518 :map "ibm866")
519 (define-charset-alias 'ibm866 'cp866)
520
521 (define-charset 'koi8-u
522 "KOI8-U"
523 :short-name "KOI8-U"
524 :ascii-compatible-p t
525 :code-space [0 255]
526 :map "koi8-u")
527
528 (define-charset 'koi8-t
529 "KOI8-T"
530 :short-name "KOI8-T"
531 :ascii-compatible-p t
532 :code-space [0 255]
533 :map "koi8-t")
534
535 (define-charset 'georgian-ps
536 "GEORGIAN-PS"
537 :short-name "GEORGIAN-PS"
538 :ascii-compatible-p t
539 :code-space [0 255]
540 :map "georgian-ps")
541
542 (define-charset 'georgian-academy
543 "GEORGIAN-ACADEMY"
544 :short-name "GEORGIAN-ACADEMY"
545 :ascii-compatible-p t
546 :code-space [0 255]
547 :map "georgian-academy")
548
549 (define-charset 'windows-1250
550 "WINDOWS-1250 (Central Europe)"
551 :short-name "WINDOWS-1250"
552 :ascii-compatible-p t
553 :code-space [0 255]
554 :map "windows-1250")
555 (define-charset-alias 'cp1250 'windows-1250)
556
557 (define-charset 'windows-1251
558 "WINDOWS-1251 (Cyrillic)"
559 :short-name "WINDOWS-1251"
560 :ascii-compatible-p t
561 :code-space [0 255]
562 :map "windows-1251")
563 (define-charset-alias 'cp1251 'windows-1251)
564
565 (define-charset 'windows-1252
566 "WINDOWS-1252 (Latin I)"
567 :short-name "WINDOWS-1252"
568 :ascii-compatible-p t
569 :code-space [0 255]
570 :map "windows-1252")
571 (define-charset-alias 'cp1252 'windows-1252)
572
573 (define-charset 'windows-1253
574 "WINDOWS-1253 (Greek)"
575 :short-name "WINDOWS-1253"
576 :ascii-compatible-p t
577 :code-space [0 255]
578 :map "windows-1253")
579 (define-charset-alias 'cp1253 'windows-1253)
580
581 (define-charset 'windows-1254
582 "WINDOWS-1254 (Turkish)"
583 :short-name "WINDOWS-1254"
584 :ascii-compatible-p t
585 :code-space [0 255]
586 :map "windows-1254")
587 (define-charset-alias 'cp1254 'windows-1254)
588
589 (define-charset 'windows-1255
590 "WINDOWS-1255 (Hebrew)"
591 :short-name "WINDOWS-1255"
592 :ascii-compatible-p t
593 :code-space [0 255]
594 :map "windows-1255")
595 (define-charset-alias 'cp1255 'windows-1255)
596
597 (define-charset 'windows-1256
598 "WINDOWS-1256 (Arabic)"
599 :short-name "WINDOWS-1256"
600 :ascii-compatible-p t
601 :code-space [0 255]
602 :map "windows-1256")
603 (define-charset-alias 'cp1256 'windows-1256)
604
605 (define-charset 'windows-1257
606 "WINDOWS-1257 (Baltic)"
607 :short-name "WINDOWS-1257"
608 :ascii-compatible-p t
609 :code-space [0 255]
610 :map "windows-1257")
611 (define-charset-alias 'cp1257 'windows-1257)
612
613 (define-charset 'windows-1258
614 "WINDOWS-1258 (Viet Nam)"
615 :short-name "WINDOWS-1258"
616 :ascii-compatible-p t
617 :code-space [0 255]
618 :map "windows-1258")
619 (define-charset-alias 'cp1258 'windows-1258)
620
621 (define-charset 'next
622 "NEXT"
623 :short-name "NEXT"
624 :ascii-compatible-p t
625 :code-space [0 255]
626 :map "next")
627
628 (define-charset 'cp1125
629 "CP1125"
630 :short-name "CP1125"
631 :code-space [0 255]
632 :map "cp1125")
633 (define-charset-alias 'ruscii 'cp1125)
634 ;; Original name for cp1125, says Serhii Hlodin <hlodin@lutsk.bank.gov.ua>
635 (define-charset-alias 'cp866u 'cp1125)
636
637 ;; Fixme: C.f. iconv, http://czyborra.com/charsets/codepages.html
638 ;; shows this as not ASCII comptaible, with various graphics in
639 ;; 0x01-0x1F.
640 (define-charset 'cp437
641 "CP437 (MS-DOS United States, Australia, New Zealand, South Africa)"
642 :short-name "CP437"
643 :code-space [0 255]
644 :ascii-compatible-p t
645 :map "cp437")
646
647 (define-charset 'cp720
648 "CP720 (Arabic)"
649 :short-name "CP720"
650 :code-space [0 255]
651 :ascii-compatible-p t
652 :map "cp720")
653
654 (define-charset 'cp737
655 "CP737 (PC Greek)"
656 :short-name "CP737"
657 :code-space [0 255]
658 :ascii-compatible-p t
659 :map "cp737")
660
661 (define-charset 'cp775
662 "CP775 (PC Baltic)"
663 :short-name "CP775"
664 :code-space [0 255]
665 :ascii-compatible-p t
666 :map "cp775")
667
668 (define-charset 'cp851
669 "CP851 (Greek)"
670 :short-name "CP851"
671 :code-space [0 255]
672 :ascii-compatible-p t
673 :map "cp851")
674
675 (define-charset 'cp852
676 "CP852 (MS-DOS Latin-2)"
677 :short-name "CP852"
678 :code-space [0 255]
679 :ascii-compatible-p t
680 :map "cp852")
681
682 (define-charset 'cp855
683 "CP855 (IBM Cyrillic)"
684 :short-name "CP855"
685 :code-space [0 255]
686 :ascii-compatible-p t
687 :map "cp855")
688
689 (define-charset 'cp857
690 "CP857 (IBM Turkish)"
691 :short-name "CP857"
692 :code-space [0 255]
693 :ascii-compatible-p t
694 :map "cp857")
695
696 (define-charset 'cp858
697 "CP858 (Multilingual Latin I + Euro)"
698 :short-name "CP858"
699 :code-space [0 255]
700 :ascii-compatible-p t
701 :map "cp858")
702 (define-charset-alias 'cp00858 'cp858) ; IANA has IBM00858/CP00858
703
704 (define-charset 'cp860
705 "CP860 (MS-DOS Portuguese)"
706 :short-name "CP860"
707 :code-space [0 255]
708 :ascii-compatible-p t
709 :map "cp860")
710
711 (define-charset 'cp861
712 "CP861 (MS-DOS Icelandic)"
713 :short-name "CP861"
714 :code-space [0 255]
715 :ascii-compatible-p t
716 :map "cp861")
717
718 (define-charset 'cp862
719 "CP862 (PC Hebrew)"
720 :short-name "CP862"
721 :code-space [0 255]
722 :ascii-compatible-p t
723 :map "cp862")
724
725 (define-charset 'cp863
726 "CP863 (MS-DOS Canadian French)"
727 :short-name "CP863"
728 :code-space [0 255]
729 :ascii-compatible-p t
730 :map "cp863")
731
732 (define-charset 'cp864
733 "CP864 (PC Arabic)"
734 :short-name "CP864"
735 :code-space [0 255]
736 :ascii-compatible-p t
737 :map "cp864")
738
739 (define-charset 'cp865
740 "CP865 (MS-DOS Nordic)"
741 :short-name "CP865"
742 :code-space [0 255]
743 :ascii-compatible-p t
744 :map "cp865")
745
746 (define-charset 'cp869
747 "CP869 (IBM Modern Greek)"
748 :short-name "CP869"
749 :code-space [0 255]
750 :ascii-compatible-p t
751 :map "cp869")
752
753 (define-charset 'cp874
754 "CP874 (IBM Thai)"
755 :short-name "CP874"
756 :code-space [0 255]
757 :ascii-compatible-p t
758 :map "cp874")
759
760 ;; For Arabic, we need three different types of character sets.
761 ;; Digits are of direction left-to-right and of width 1-column.
762 ;; Others are of direction right-to-left and of width 1-column or
763 ;; 2-column.
764 (define-charset 'arabic-digit
765 "Arabic digit"
766 :short-name "Arabic digit"
767 :iso-final-char ?2
768 :emacs-mule-id 164
769 :code-space [34 42]
770 :code-offset #x0600)
771
772 (define-charset 'arabic-1-column
773 "Arabic 1-column"
774 :short-name "Arabic 1-col"
775 :long-name "Arabic 1-column"
776 :iso-final-char ?3
777 :emacs-mule-id 165
778 :code-space [33 126]
779 :code-offset #x200100)
780
781 (define-charset 'arabic-2-column
782 "Arabic 2-column"
783 :short-name "Arabic 2-col"
784 :long-name "Arabic 2-column"
785 :iso-final-char ?4
786 :emacs-mule-id 224
787 :code-space [33 126]
788 :code-offset #x200180)
789
790 ;; Lao script.
791 ;; Codes 0x21..0x7E are mapped to Unicode U+0E81..U+0EDF.
792 ;; Not all of them are defined unicodes.
793 (define-charset 'lao
794 "Lao characters (ISO10646 0E81..0EDF)"
795 :short-name "Lao"
796 :iso-final-char ?1
797 :emacs-mule-id 167
798 :code-space [33 126]
799 :code-offset #x0E81)
800
801 (define-charset 'mule-lao
802 "Lao characters (ISO10646 0E81..0EDF)"
803 :short-name "Lao"
804 :code-space [0 255]
805 :superset '(ascii eight-bit-control (lao . 128)))
806
807
808 ;; Indian scripts. Symbolic charset for data exchange. Glyphs are
809 ;; not assigned. They are automatically converted to each Indian
810 ;; script which IS-13194 supports.
811
812 (define-charset 'indian-is13194
813 "Generic Indian charset for data exchange with IS 13194"
814 :short-name "IS 13194"
815 :long-name "Indian IS 13194"
816 :iso-final-char ?5
817 :emacs-mule-id 225
818 :code-space [33 126]
819 :code-offset #x180000)
820
821 (define-charset 'devanagari-glyph
822 "Glyphs for Devanagari script. Subset of `indian-glyph'."
823 :short-name "Devanagari glyph"
824 :code-space [0 255]
825 :code-offset #x180100)
826
827 (define-charset 'malayalam-glyph
828 "Glyphs for Malayalam script. Subset of `indian-glyph'."
829 :short-name "Malayalam glyph"
830 :code-space [0 255]
831 :code-offset #x180200)
832
833 ;; These would be necessary for supporting the complete set of Indian
834 ;; scripts. See also fontset.el.
835
836 ;; (let ((i 0))
837 ;; (dolist (script '(sanskrit bengali tamil telugu assamese
838 ;; oriya kannada malayalam gujarati punjabi))
839 ;; (define-charset (intern (concat (symbol-name script) "-glyph"))
840 ;; (concat "Glyphs for " (capitalize (symbol-name script))
841 ;; " script. Subset of `indian-glyph'.")
842 ;; :short-name (concat (capitalize (symbol-name script)) " glyph")
843 ;; :code-space [0 255]
844 ;; :code-offset (+ #x180100 (* 256 i)))
845 ;; (setq i (1+ i))))
846
847 (define-charset 'indian-glyph
848 "Glyphs for Indian characters."
849 :short-name "Indian glyph"
850 :iso-final-char ?4
851 :emacs-mule-id 240
852 :code-space [32 127 32 127]
853 :code-offset #x180100)
854
855 ;; Actual Glyph for 1-column width.
856 (define-charset 'indian-1-column
857 "Indian charset for 1-column width glyphs."
858 :short-name "Indian 1-col"
859 :long-name "Indian 1 Column"
860 :iso-final-char ?6
861 :emacs-mule-id 240
862 :code-space [33 126 33 126]
863 :code-offset #x184000)
864
865 ;; Actual Glyph for 2-column width.
866 (define-charset 'indian-2-column
867 "Indian charset for 2-column width glyphs."
868 :short-name "Indian 2-col"
869 :long-name "Indian 2 Column"
870 :iso-final-char ?5
871 :emacs-mule-id 251
872 :code-space [33 126 33 126]
873 :code-offset #x184000)
874
875 (define-charset 'tibetan
876 "Tibetan characters"
877 :iso-final-char ?7
878 :short-name "Tibetan 2-col"
879 :long-name "Tibetan 2 column"
880 :iso-final-char ?7
881 :emacs-mule-id 252
882 :unify-map "tibetan"
883 :code-space [33 126 33 37]
884 :code-offset #x190000)
885
886 (define-charset 'tibetan-1-column
887 "Tibetan 1 column glyph"
888 :short-name "Tibetan 1-col"
889 :long-name "Tibetan 1 column"
890 :iso-final-char ?8
891 :emacs-mule-id 241
892 :code-space [33 126 33 37]
893 :code-offset #x190000)
894
895 ;; Subsets of Unicode.
896 (define-charset 'mule-unicode-2500-33ff
897 "Unicode characters of the range U+2500..U+33FF."
898 :short-name "Unicode subset 2"
899 :long-name "Unicode subset (U+2500..U+33FF)"
900 :iso-final-char ?2
901 :emacs-mule-id 242
902 :code-space [#x20 #x7f #x20 #x47]
903 :code-offset #x2500)
904
905 (define-charset 'mule-unicode-e000-ffff
906 "Unicode characters of the range U+E000..U+FFFF."
907 :short-name "Unicode subset 3"
908 :long-name "Unicode subset (U+E000+FFFF)"
909 :iso-final-char ?3
910 :emacs-mule-id 243
911 :code-space [#x20 #x7F #x20 #x75]
912 :code-offset #xE000
913 :max-code 30015) ; U+FFFF
914
915 (define-charset 'mule-unicode-0100-24ff
916 "Unicode characters of the range U+0100..U+24FF."
917 :short-name "Unicode subset"
918 :long-name "Unicode subset (U+0100..U+24FF)"
919 :iso-final-char ?1
920 :emacs-mule-id 244
921 :code-space [#x20 #x7F #x20 #x7F]
922 :code-offset #x100)
923
924 (define-charset 'unicode-bmp
925 "Unicode Basic Multilingual Plane"
926 :short-name "Unicode BMP"
927 :code-space [0 255 0 255]
928 :code-offset 0)
929
930 (define-charset 'ethiopic
931 "Ethiopic characters for Amharic and Tigrigna."
932 :short-name "Ethiopic"
933 :long-name "Ethiopic characters"
934 :iso-final-char ?3
935 :emacs-mule-id 245
936 :unify-map "ethiopic"
937 :code-space [33 126 33 126]
938 :code-offset #x1A0000)
939
940 (define-charset 'mac-roman
941 "Mac Roman charset"
942 :short-name "Mac Roman"
943 :ascii-compatible-p t
944 :code-space [0 255]
945 :map "mac-roman")
946
947 ;; Fixme: modern EBCDIC variants, e.g. IBM00924?
948 (define-charset 'ebcdic-us
949 "US version of EBCDIC"
950 :short-name "EBCDIC-US"
951 :code-space [0 255]
952 :mime-charset 'ebcdic-us
953 :map "ebcdic-us")
954
955 (define-charset 'ebcdic-uk
956 "UK version of EBCDIC"
957 :short-name "EBCDIC-UK"
958 :code-space [0 255]
959 :mime-charset 'ebcdic-uk
960 :map "ebcdic-uk")
961
962 (define-charset 'ibm1047
963 ;; Says groff:
964 "IBM1047, `EBCDIC Latin 1/Open Systems' used by OS/390 Unix."
965 :short-name "IBM1047"
966 :code-space [0 255]
967 :mime-charset 'ibm1047
968 :map "ibm1047")
969 (define-charset-alias 'cp1047 'ibm1047)
970
971 (define-charset 'hp-roman8
972 "Encoding used by Hewlet-Packard printer software"
973 :short-name "HP-ROMAN8"
974 :ascii-compatible-p t
975 :code-space [0 255]
976 :map "hp-roman8")
977
978 ;; To make a coding system with this, a pre-write-conversion should
979 ;; account for the commented-out multi-valued code points in
980 ;; stdenc.map.
981 (define-charset 'adobe-standard-encoding
982 "Adobe `standard encoding' used in PostScript"
983 :short-name "ADOBE-STANDARD-ENCODING"
984 :code-space [#x20 255]
985 :map "stdenc")
986
987 (define-charset 'symbol
988 "Adobe symbol encoding used in PostScript"
989 :short-name "ADOBE-SYMBOL"
990 :code-space [#x20 255]
991 :map "symbol")
992
993 (define-charset 'ibm850
994 "DOS codepage 850 (Latin-1)"
995 :short-name "IBM850"
996 :ascii-compatible-p t
997 :code-space [0 255]
998 :map "ibm850")
999 (define-charset-alias 'cp850 'ibm850)
1000
1001 (define-charset 'mik
1002 "Bulgarian DOS codepage"
1003 :short-name "MIK"
1004 :ascii-compatible-p t
1005 :code-space [0 255]
1006 :map "mik")
1007
1008 (define-charset 'pt154
1009 "`Paratype' codepage (Asian Cyrillic)"
1010 :short-name "PT154"
1011 :ascii-compatible-p t
1012 :code-space [0 255]
1013 :mime-charset 'pt154
1014 :map "pt154")
1015 (define-charset-alias 'ptcp154 'pt154)
1016 (define-charset-alias 'cp154 'pt154)
1017
1018 (define-charset 'gb18030-2-byte
1019 "GB18030 2-byte (0x814E..0xFEFE)"
1020 :code-space [#x40 #xFE #x81 #xFE]
1021 :supplementary-p t
1022 :map "gb18030-2")
1023
1024 (define-charset 'gb18030-4-byte-bmp
1025 "GB18030 4-byte for BMP (0x81308130-0x8431A439)"
1026 :code-space [#x30 #x39 #x81 #xFE #x30 #x39 #x81 #x84]
1027 :supplementary-p t
1028 :map "gb18030-4")
1029
1030 (define-charset 'gb18030-4-byte-smp
1031 "GB18030 4-byte for SMP (0x90308130-0xE3329A35)"
1032 :code-space [#x30 #x39 #x81 #xFE #x30 #x39 #x90 #xE3]
1033 :min-code '(#x9030 . #x8130)
1034 :max-code '(#xE332 . #x9A35)
1035 :supplementary-p t
1036 :code-offset #x10000)
1037
1038 (define-charset 'gb18030-4-byte-ext-1
1039 "GB18030 4-byte (0x8431A530-0x8F39FE39)"
1040 :code-space [#x30 #x39 #x81 #xFE #x30 #x39 #x84 #x8F]
1041 :min-code '(#x8431 . #xA530)
1042 :max-code '(#x8F39 . #xFE39)
1043 :supplementary-p t
1044 :code-offset #x200000 ; ... #x22484B
1045 )
1046
1047 (define-charset 'gb18030-4-byte-ext-2
1048 "GB18030 4-byte (0xE3329A36-0xFE39FE39)"
1049 :code-space [#x30 #x39 #x81 #xFE #x30 #x39 #xE3 #xFE]
1050 :min-code '(#xE332 . #x9A36)
1051 :max-code '(#xFE39 . #xFE39)
1052 :supplementary-p t
1053 :code-offset #X22484C ; ... #x279f93
1054 )
1055
1056 (define-charset 'gb18030
1057 "GB18030"
1058 :code-space [#x00 #xFF #x00 #xFE #x00 #xFE #x00 #xFE]
1059 :min-code 0
1060 :max-code '(#xFE39 . #xFE39)
1061 :superset '(ascii gb18030-2-byte
1062 gb18030-4-byte-bmp gb18030-4-byte-smp
1063 gb18030-4-byte-ext-1 gb18030-4-byte-ext-2))
1064
1065 (unify-charset 'chinese-gb2312)
1066 (unify-charset 'chinese-gbk)
1067 (unify-charset 'chinese-cns11643-1)
1068 (unify-charset 'chinese-cns11643-2)
1069 (unify-charset 'big5)
1070 (unify-charset 'chinese-big5-1)
1071 (unify-charset 'chinese-big5-2)
1072 (unify-charset 'vietnamese-viscii-lower)
1073 (unify-charset 'vietnamese-viscii-upper)
1074 (unify-charset 'big5-hkscs)
1075 (unify-charset 'chinese-sisheng)
1076 (unify-charset 'korean-ksc5601)
1077 (unify-charset 'ipa)
1078 (unify-charset 'tibetan)
1079 (unify-charset 'ethiopic)
1080 ;; (unify-charset 'japanese-jisx0208-1978)
1081 (unify-charset 'japanese-jisx0208)
1082 (unify-charset 'japanese-jisx0212)
1083 (unify-charset 'japanese-jisx0213-1)
1084 (unify-charset 'japanese-jisx0213-2)
1085
1086 \f
1087 ;; These are tables for translating characters on decoding and
1088 ;; encoding.
1089 ;; Fixme: these aren't used now -- should they be?
1090 (setq standard-translation-table-for-decode nil)
1091
1092 (setq standard-translation-table-for-encode nil)
1093
1094 ;; Fixme: should this be retained? I guess it could be useful for
1095 ;; non-unified charsets.
1096 (defvar translation-table-for-input nil
1097 "If non-nil, a char table used to translate characters from input methods.
1098 \(Currently only used by Quail.)")
1099 \f
1100 ;;; Make fundamental coding systems.
1101
1102 ;; The coding system `no-conversion' is already defined in coding.c as
1103 ;; below:
1104 ;;
1105 ;; (define-coding-system 'no-conversion
1106 ;; "Do no conversion."
1107 ;; :coding-type 'raw-text
1108 ;; :mnemonic ?=)
1109
1110 (define-coding-system-alias 'binary 'no-conversion)
1111
1112 (define-coding-system 'raw-text
1113 "Raw text, which means text contains random 8-bit codes.
1114 Encoding text with this coding system produces the actual byte
1115 sequence of the text in buffers and strings. An exception is made for
1116 eight-bit-control characters. Each of them is encoded into a single
1117 byte.
1118
1119 When you visit a file with this coding, the file is read into a
1120 unibyte buffer as is (except for EOL format), thus each byte of a file
1121 is treated as a character."
1122 :coding-type 'raw-text
1123 :mnemonic ?t)
1124
1125 (define-coding-system 'undecided
1126 "No conversion on encoding, automatic conversion on decoding."
1127 :coding-type 'undecided
1128 :mnemonic ?-
1129 :charset-list '(ascii))
1130
1131 (define-coding-system-alias 'unix 'undecided-unix)
1132 (define-coding-system-alias 'dos 'undecided-dos)
1133 (define-coding-system-alias 'mac 'undecided-mac)
1134
1135 (define-coding-system 'iso-latin-1
1136 "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)."
1137 :coding-type 'charset
1138 :mnemonic ?1
1139 :charset-list '(iso-8859-1)
1140 :mime-charset 'iso-8859-1)
1141
1142 (define-coding-system-alias 'iso-8859-1 'iso-latin-1)
1143 (define-coding-system-alias 'latin-1 'iso-latin-1)
1144
1145 ;; Coding systems not specific to each language environment.
1146
1147 (define-coding-system 'emacs-mule
1148 "Emacs 21 internal format used in buffer and string."
1149 :coding-type 'emacs-mule
1150 :charset-list 'emacs-mule
1151 :mnemonic ?M)
1152
1153 (define-coding-system 'utf-8
1154 "UTF-8."
1155 :coding-type 'utf-8
1156 :mnemonic ?U
1157 :charset-list '(unicode)
1158 :mime-charset 'utf-8)
1159
1160 (define-coding-system-alias 'mule-utf-8 'utf-8)
1161
1162 (define-coding-system 'utf-8-emacs
1163 "Support for all Emacs characters (including non-Unicode characters)."
1164 :coding-type 'utf-8
1165 :mnemonic ?U
1166 :charset-list '(emacs))
1167
1168 (define-coding-system 'utf-16le
1169 "UTF-16LE (little endian, no signature (BOM))."
1170 :coding-type 'utf-16
1171 :mnemonic ?U
1172 :charset-list '(unicode)
1173 :endian 'little
1174 :mime-text-unsuitable t
1175 :mime-charset 'utf-16le)
1176
1177 (define-coding-system 'utf-16be
1178 "UTF-16BE (big endian, no signature (BOM))."
1179 :coding-type 'utf-16
1180 :mnemonic ?U
1181 :charset-list '(unicode)
1182 :endian 'big
1183 :mime-text-unsuitable t
1184 :mime-charset 'utf-16be)
1185
1186 (define-coding-system 'utf-16le-with-signature
1187 "UTF-16 (little endian, with signature (BOM))."
1188 :coding-type 'utf-16
1189 :mnemonic ?U
1190 :charset-list '(unicode)
1191 :bom t
1192 :endian 'little
1193 :mime-text-unsuitable t
1194 :mime-charset 'utf-16)
1195
1196 (define-coding-system 'utf-16be-with-signature
1197 "UTF-16 (big endian, with signature)."
1198 :coding-type 'utf-16
1199 :mnemonic ?U
1200 :charset-list '(unicode)
1201 :bom t
1202 :endian 'big
1203 :mime-text-unsuitable t
1204 :mime-charset 'utf-16)
1205
1206 (define-coding-system 'utf-16
1207 "UTF-16 (detect endian on decoding, use big endian on encoding with BOM)."
1208 :coding-type 'utf-16
1209 :mnemonic ?U
1210 :charset-list '(unicode)
1211 :bom '(utf-16le-with-signature . utf-16be-with-signature)
1212 :endian 'big
1213 :mime-text-unsuitable t
1214 :mime-charset 'utf-16)
1215
1216 ;; Backwards compatibility (old names, also used by Mule-UCS). We
1217 ;; prefer the MIME names.
1218 (define-coding-system-alias 'utf-16-le 'utf-16le-with-signature)
1219 (define-coding-system-alias 'utf-16-be 'utf-16be-with-signature)
1220
1221
1222 (define-coding-system 'iso-2022-7bit
1223 "ISO 2022 based 7-bit encoding using only G0."
1224 :coding-type 'iso-2022
1225 :mnemonic ?J
1226 :charset-list 'iso-2022
1227 :designation [(ascii t) nil nil nil]
1228 :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation composition))
1229
1230 (define-coding-system 'iso-2022-7bit-ss2
1231 "ISO 2022 based 7-bit encoding using SS2 for 96-charset."
1232 :coding-type 'iso-2022
1233 :mnemonic ?$
1234 :charset-list 'iso-2022
1235 :designation [(ascii 94) nil (nil 96) nil]
1236 :flags '(short ascii-at-eol ascii-at-cntl 7-bit
1237 designation single-shift composition))
1238
1239 (define-coding-system 'iso-2022-7bit-lock
1240 "ISO-2022 coding system using Locking-Shift for 96-charset."
1241 :coding-type 'iso-2022
1242 :mnemonic ?&
1243 :charset-list 'iso-2022
1244 :designation [(ascii 94) (nil 96) nil nil]
1245 :flags '(ascii-at-eol ascii-at-cntl 7-bit
1246 designation locking-shift composition))
1247
1248 (define-coding-system-alias 'iso-2022-int-1 'iso-2022-7bit-lock)
1249
1250 (define-coding-system 'iso-2022-7bit-lock-ss2
1251 "Mixture of ISO-2022-JP, ISO-2022-KR, and ISO-2022-CN."
1252 :coding-type 'iso-2022
1253 :mnemonic ?i
1254 :charset-list '(ascii
1255 japanese-jisx0208 japanese-jisx0208-1978 latin-jisx0201
1256 korean-ksc5601
1257 chinese-gb2312
1258 chinese-cns11643-1 chinese-cns11643-2 chinese-cns11643-3
1259 chinese-cns11643-4 chinese-cns11643-5 chinese-cns11643-6
1260 chinese-cns11643-7)
1261 :designation [(ascii 94)
1262 (nil korean-ksc5601 chinese-gb2312 chinese-cns11643-1 96)
1263 (nil chinese-cns11643-2)
1264 (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
1265 chinese-cns11643-6 chinese-cns11643-7)]
1266 :flags '(short ascii-at-eol ascii-at-cntl 7-bit locking-shift
1267 single-shift init-bol))
1268
1269 (define-coding-system-alias 'iso-2022-cjk 'iso-2022-7bit-lock-ss2)
1270
1271 (define-coding-system 'iso-2022-8bit-ss2
1272 "ISO 2022 based 8-bit encoding using SS2 for 96-charset."
1273 :coding-type 'iso-2022
1274 :mnemonic ?@
1275 :charset-list 'iso-2022
1276 :designation [(ascii 94) nil (nil 96) nil]
1277 :flags '(ascii-at-eol ascii-at-cntl designation single-shift composition))
1278
1279 (define-coding-system 'compound-text
1280 "Compound text based generic encoding for decoding unknown messages.
1281
1282 This coding system does not support ICCCM Extended Segments."
1283 :coding-type 'iso-2022
1284 :mnemonic ?x
1285 :charset-list 'iso-2022
1286 :designation [(ascii 94) (latin-iso8859-1 katakana-jisx0201 96) nil nil]
1287 :flags '(ascii-at-eol ascii-at-cntl
1288 designation locking-shift single-shift composition)
1289 ;; Fixme: this isn't a valid MIME charset and has to be
1290 ;; special-cased elsewhere -- fx
1291 :mime-charset 'x-ctext)
1292
1293 (define-coding-system-alias 'x-ctext 'compound-text)
1294 (define-coding-system-alias 'ctext 'compound-text)
1295
1296 ;; Same as compound-text, but doesn't produce composition escape
1297 ;; sequences. Used in post-read and pre-write conversions of
1298 ;; compound-text-with-extensions, see mule.el. Note that this should
1299 ;; not have a mime-charset property, to prevent it from showing up
1300 ;; close to the beginning of coding systems ordered by priority.
1301 (define-coding-system 'ctext-no-compositions 2 ?x
1302 "Compound text based generic encoding for decoding unknown messages.
1303
1304 Like `compound-text', but does not produce escape sequences for compositions."
1305 :coding-type 'iso-2022
1306 :mnemonic ?x
1307 :charset-list 'iso-2022
1308 :designation [(ascii 94) (latin-iso8859-1 katakana-jisx0201 96) nil nil]
1309 :flags '(ascii-at-eol ascii-at-cntl
1310 designation locking-shift single-shift))
1311
1312 (define-coding-system 'compound-text-with-extensions
1313 "Compound text encoding with ICCCM Extended Segment extensions.
1314
1315 This coding system should be used only for X selections. It is inappropriate
1316 for decoding and encoding files, process I/O, etc."
1317 :coding-type 'raw-text
1318 :mnemonic ?x
1319 :post-read-conversion 'ctext-post-read-conversion
1320 :pre-write-conversion 'ctext-pre-write-conversion)
1321
1322 (define-coding-system-alias
1323 'x-ctext-with-extensions 'compound-text-with-extensions)
1324 (define-coding-system-alias
1325 'ctext-with-extensions 'compound-text-with-extensions)
1326
1327 (define-coding-system 'us-ascii
1328 "Convert all characters but ASCII to `?'."
1329 :coding-type 'charset
1330 :mnemonic ?-
1331 :charset-list '(ascii)
1332 :default-char ??
1333 :mime-charset 'us-ascii)
1334
1335 (define-coding-system-alias 'iso-safe 'us-ascii)
1336
1337 (define-coding-system 'utf-7
1338 "UTF-7 encoding of Unicode (RFC 2152)."
1339 :coding-type 'utf-8
1340 :mnemonic ?U
1341 :mime-charset 'utf-7
1342 :charset-list '(unicode)
1343 :pre-write-conversion 'utf-7-pre-write-conversion
1344 :post-read-conversion 'utf-7-post-read-conversion)
1345
1346 ;; Use us-ascii for terminal output if some other coding system is not
1347 ;; specified explicitly.
1348 (set-safe-terminal-coding-system-internal 'us-ascii)
1349
1350 ;; The other coding-systems are defined in each language specific
1351 ;; files under lisp/language.
1352
1353 ;; Normally, set coding system to `undecided' before reading a file.
1354 ;; Compiled Emacs Lisp files (*.elc) are not decoded at all,
1355 ;; but we regard them as containing multibyte characters.
1356 ;; Tar files are not decoded at all, but we treat them as raw bytes.
1357
1358 (setq file-coding-system-alist
1359 '(("\\.elc\\'" . utf-8-emacs)
1360 ("\\.utf\\(-8\\)?\\'" . utf-8)
1361 ;; This is the defined default for XML documents. It may be
1362 ;; overridden by a charset specification in the header. That
1363 ;; should be grokked by the auto-coding mechanism, but rms
1364 ;; vetoed that. -- fx
1365 ("\\.xml\\'" . utf-8)
1366 ;; We use raw-text for reading loaddefs.el so that if it
1367 ;; happens to have DOS or Mac EOLs, they are converted to
1368 ;; newlines. This is required to make the special treatment
1369 ;; of the "\ newline" combination in loaddefs.el, which marks
1370 ;; the beginning of a doc string, work.
1371 ("\\(\\`\\|/\\)loaddefs.el\\'" . (raw-text . raw-text-unix))
1372 ("\\.tar\\'" . (no-conversion . no-conversion))
1373 ("" . (undecided . nil))))
1374
1375 \f
1376 ;;; Setting coding categories and their priorities.
1377
1378 ;; This setting is just to read an Emacs Lisp source files which
1379 ;; contain multilingual text while dumping Emacs. More appropriate
1380 ;; values are set by the command `set-language-environment' for each
1381 ;; language environment.
1382
1383 (set-coding-system-priority
1384 'iso-latin-1
1385 'utf-8
1386 'iso-2022-7bit
1387 )
1388
1389 \f
1390 ;;; Miscellaneous settings.
1391
1392 ;; Make all multibyte characters self-insert.
1393 (set-char-table-range (nth 1 global-map)
1394 (cons 128 (max-char))
1395 'self-insert-command)
1396
1397 (aset latin-extra-code-table ?\222 t)
1398
1399 ;; Move least specific charsets to end of priority list
1400
1401 (apply #'set-charset-priority
1402 (delq 'unicode (delq 'emacs (charset-priority-list))))
1403
1404 ;; The old code-pages library is obsoleted by coding systems based on
1405 ;; the charsets defined in this file but might be required by user
1406 ;; code.
1407 (provide 'code-pages)
1408
1409 ;; Local variables:
1410 ;; no-byte-compile: t
1411 ;; End:
1412
1413 ;;; mule-conf.el ends here