Commit | Line | Data |
---|---|---|
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 DL |
177 | (define-iso-single-byte-charset 'iso-8859-16 'latin-iso8859-16 |
178 | "ISO/IEC 8859/16" "Latin-9" 226 ?f nil "8859-16") | |
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") | |
08c19a27 | 457 | |
6ef462e0 DL |
458 | (define-charset 'koi8-u |
459 | "KOI8-U" | |
460 | :short-name "KOI8-U" | |
461 | :long-name "KOI8-U" | |
462 | :ascii-compatible-p t | |
463 | :code-space [0 255] | |
464 | :map "koi8-u") | |
465 | ||
466 | (define-charset 'koi8-t | |
467 | "KOI8-T" | |
468 | :short-name "KOI8-T" | |
469 | :long-name "KOI8-T" | |
470 | :ascii-compatible-p t | |
471 | :code-space [0 255] | |
472 | :map "koi8-t") | |
473 | ||
474 | (define-charset 'georgian-ps | |
475 | "GEORGIAN-PS" | |
476 | :short-name "GEORGIAN-PS" | |
477 | :long-name "GEORGIAN-PS" | |
478 | :ascii-compatible-p t | |
479 | :code-space [0 255] | |
480 | :map "georgian-ps") | |
481 | ||
482 | (define-charset 'windows-1250 | |
9fea1ee1 | 483 | "WINDOWS-1250 (Central Europe)" |
6ef462e0 DL |
484 | :short-name "WINDOWS-1250" |
485 | :long-name "WINDOWS-1250" | |
486 | :ascii-compatible-p t | |
487 | :code-space [0 255] | |
488 | :map "windows-1250") | |
489 | (define-charset-alias 'cp1250 'windows-1250) | |
490 | ||
491 | (define-charset 'windows-1251 | |
492 | "WINDOWS-1251" | |
493 | :short-name "WINDOWS-1251" | |
494 | :long-name "WINDOWS-1251" | |
495 | :ascii-compatible-p t | |
496 | :code-space [0 255] | |
497 | :map "windows-1251") | |
498 | (define-charset-alias 'cp1251 'windows-1251) | |
499 | ||
500 | (define-charset 'windows-1252 | |
9fea1ee1 | 501 | "WINDOWS-1252 (Greek)" |
6ef462e0 DL |
502 | :short-name "WINDOWS-1252" |
503 | :long-name "WINDOWS-1252" | |
504 | :ascii-compatible-p t | |
505 | :code-space [0 255] | |
506 | :map "windows-1252") | |
507 | (define-charset-alias 'cp1252 'windows-1252) | |
508 | ||
9fea1ee1 DL |
509 | (define-charset 'windows-1253 |
510 | "WINDOWS-1253" | |
511 | :short-name "WINDOWS-1253" | |
512 | :long-name "WINDOWS-1253" | |
513 | :ascii-compatible-p t | |
514 | :code-space [0 255] | |
515 | :map "windows-1253") | |
516 | (define-charset-alias 'cp1253 'windows-1253) | |
517 | ||
518 | (define-charset 'windows-1254 | |
519 | "WINDOWS-1254" | |
520 | :short-name "WINDOWS-1254" | |
521 | :long-name "WINDOWS-1254" | |
522 | :ascii-compatible-p t | |
523 | :code-space [0 255] | |
524 | :map "windows-1254") | |
525 | (define-charset-alias 'cp1254 'windows-1254) | |
526 | ||
527 | (define-charset 'windows-1255 | |
528 | "WINDOWS-1255 (Hebrew)" | |
529 | :short-name "WINDOWS-1255" | |
530 | :long-name "WINDOWS-1255" | |
531 | :ascii-compatible-p t | |
532 | :code-space [0 255] | |
533 | :map "windows-1255") | |
534 | (define-charset-alias 'cp1255 'windows-1255) | |
535 | ||
536 | (define-charset 'windows-1256 | |
537 | "WINDOWS-1256 (Arabic)" | |
538 | :short-name "WINDOWS-1256" | |
539 | :long-name "WINDOWS-1256" | |
540 | :ascii-compatible-p t | |
541 | :code-space [0 255] | |
542 | :map "windows-1256") | |
543 | (define-charset-alias 'cp1256 'windows-1256) | |
544 | ||
545 | (define-charset 'windows-1257 | |
546 | "WINDOWS-1257 (Baltic)" | |
547 | :short-name "WINDOWS-1257" | |
548 | :long-name "WINDOWS-1257" | |
549 | :ascii-compatible-p t | |
550 | :code-space [0 255] | |
551 | :map "windows-1257") | |
552 | (define-charset-alias 'cp1257 'windows-1257) | |
553 | ||
554 | (define-charset 'windows-1258 | |
555 | "WINDOWS-1258" | |
556 | :short-name "WINDOWS-1258" | |
557 | :long-name "WINDOWS-1258" | |
558 | :ascii-compatible-p t | |
559 | :code-space [0 255] | |
560 | :map "windows-1258") | |
561 | (define-charset-alias 'cp1258 'windows-1258) | |
562 | ||
563 | (define-charset 'next | |
564 | "NEXT" | |
565 | :short-name "NEXT" | |
566 | :long-name "NEXT" | |
567 | :ascii-compatible-p t | |
568 | :code-space [0 255] | |
569 | :map "next") | |
570 | ||
6ef462e0 DL |
571 | (define-charset 'cp1125 |
572 | "CP1125" | |
573 | :short-name "CP1125" | |
574 | :long-name "CP1125" | |
575 | :code-space [0 255] | |
576 | :map "cp1125") | |
577 | (define-charset-alias 'ruscii 'cp1125) | |
578 | ;; Original name for cp1125, says Serhii Hlodin <hlodin@lutsk.bank.gov.ua> | |
579 | (define-charset-alias 'cp866u 'cp1125) | |
580 | ||
08c19a27 KH |
581 | ;; For Arabic, we need three different types of character sets. |
582 | ;; Digits are of direction left-to-right and of width 1-column. | |
583 | ;; Others are of direction right-to-left and of width 1-column or | |
584 | ;; 2-column. | |
c0e17dd8 KH |
585 | (define-charset 'arabic-digit |
586 | "Arabic digit" | |
587 | :short-name "Arabic digit" | |
588 | :long-name "Arabic digit" | |
589 | :iso-final-char ?2 | |
590 | :emacs-mule-id 164 | |
591 | :code-space [34 42] | |
592 | :code-offset #x0600) | |
593 | ||
594 | (define-charset 'arabic-1-column | |
595 | "Arabic 1-column" | |
596 | :short-name "Arabic 1-col" | |
597 | :long-name "Arabic 1-column" | |
598 | :iso-final-char ?3 | |
599 | :emacs-mule-id 165 | |
600 | :code-space [33 126] | |
601 | :code-offset #x200100) | |
602 | ||
603 | (define-charset 'arabic-2-column | |
604 | "Arabic 2-column" | |
605 | :short-name "Arabic 2-col" | |
606 | :long-name "Arabic 2-column" | |
607 | :iso-final-char ?4 | |
608 | :emacs-mule-id 224 | |
609 | :code-space [33 126] | |
610 | :code-offset #x200180) | |
7153b1f1 KH |
611 | |
612 | ;; Lao script. | |
c0e17dd8 KH |
613 | ;; Codes 0x21..0x7E are mapped to Unicode U+0E81..U+0EDF. |
614 | (define-charset 'lao | |
615 | "Lao characters (ISO10646 0E81..0EDF)" | |
616 | :short-name "Lao" | |
617 | :long-name "Lao" | |
618 | :iso-final-char ?1 | |
619 | :emacs-mule-id 167 | |
620 | :code-space [33 126] | |
621 | :code-offset #x0E81) | |
622 | ||
623 | (define-charset 'mule-lao | |
624 | "Lao characters (ISO10646 0E81..0EDF)" | |
625 | :short-name "Lao" | |
626 | :long-name "Lao" | |
627 | :code-space [0 255] | |
628 | :parents '(ascii eight-bit-control (lao . -128))) | |
7153b1f1 | 629 | |
08c19a27 | 630 | |
7153b1f1 KH |
631 | ;; Indian scripts. Symbolic charset for data exchange. Glyphs are |
632 | ;; not assigned. They are automatically converted to each Indian | |
633 | ;; script which IS-13194 supports. | |
634 | ||
c0e17dd8 KH |
635 | (define-charset 'indian-is13194 |
636 | "Generic Indian charset for data exchange with IS 13194" | |
637 | :short-name "IS 13194" | |
638 | :long-name "Indian IS 13194" | |
639 | :iso-final-char ?5 | |
640 | :emacs-mule-id 225 | |
641 | :code-space [33 126] | |
642 | :code-offset #x180000) | |
643 | ||
644 | (define-charset 'indian-glyph | |
645 | "Glyphs for Indian characters." | |
646 | :short-name "Indian glyph" | |
647 | :long-name "Indian glyph" | |
648 | :iso-final-char ?4 | |
649 | :emacs-mule-id 240 | |
650 | :code-space [32 127 32 127] | |
651 | :code-offset #x180100) | |
7153b1f1 KH |
652 | |
653 | ;; Actual Glyph for 1-column width. | |
c0e17dd8 KH |
654 | (define-charset 'indian-1-column |
655 | "Indian charset for 1-column width glyphs" | |
656 | :short-name "Indian 1-col" | |
657 | :long-name "Indian 1 Column" | |
658 | :iso-final-char ?6 | |
659 | :emacs-mule-id 240 | |
660 | :code-space [33 126 33 126] | |
661 | :code-offset #x184000) | |
08c19a27 | 662 | |
08c19a27 | 663 | ;; Actual Glyph for 2-column width. |
c0e17dd8 KH |
664 | (define-charset 'indian-2-column |
665 | "Indian charset for 2-column width glyphs" | |
666 | :short-name "Indian 2-col" | |
667 | :long-name "Indian 2 Column" | |
668 | :iso-final-char ?5 | |
669 | :emacs-mule-id 251 | |
670 | :code-space [33 126 33 126] | |
671 | :parents '(indian-1-column)) | |
672 | ||
673 | (define-charset 'tibetan | |
674 | "Tibetan characters" | |
675 | :iso-final-char ?7 | |
676 | :short-name "Tibetan 2-col" | |
24adcac1 | 677 | :long-name "Tibetan 2 column" |
c0e17dd8 KH |
678 | :iso-final-char ?7 |
679 | :emacs-mule-id 252 | |
680 | :code-space [33 126 33 126] | |
681 | :code-offset #x190000) | |
682 | ||
683 | (define-charset 'tibetan-1-column | |
684 | "Tibetan 1 column glyph" | |
685 | :short-name "Tibetan 1-col" | |
686 | :long-name "Tibetan 1 column" | |
687 | :iso-final-char ?8 | |
688 | :emacs-mule-id 241 | |
689 | :code-space [33 126 33 37] | |
690 | :parents '(tibetan)) | |
08c19a27 | 691 | |
c0e17dd8 KH |
692 | ;; Subsets of Unicode. |
693 | (define-charset 'mule-unicode-2500-33ff | |
694 | "Unicode characters of the range U+2500..U+33FF." | |
695 | :short-name "Unicode subset 2" | |
696 | :long-name "Unicode subset (U+2500..U+33FF)" | |
697 | :iso-final-char ?2 | |
698 | :emacs-mule-id 242 | |
699 | :code-space [#x20 #x7f #x20 #x47] | |
700 | :code-offset #x2500) | |
701 | ||
702 | (define-charset 'mule-unicode-e000-ffff | |
703 | "Unicode characters of the range U+E000..U+FFFF." | |
704 | :short-name "Unicode subset 3" | |
705 | :long-name "Unicode subset (U+E000+FFFF)" | |
706 | :iso-final-char ?3 | |
707 | :emacs-mule-id 243 | |
708 | :code-space [#x20 #x7F #x20 #x75] | |
709 | :code-offset #xE000) | |
710 | ||
711 | (define-charset 'mule-unicode-0100-24ff | |
712 | "Unicode characters of the range U+0100..U+24FF." | |
713 | :short-name "Unicode subset" | |
714 | :long-name "Unicode subset (U+0100..U+24FF)" | |
715 | :iso-final-char ?1 | |
716 | :emacs-mule-id 244 | |
717 | :code-space [#x20 #x7F #x20 #x7F] | |
718 | :code-offset #x100) | |
719 | ||
720 | (define-charset 'ethiopic | |
24adcac1 | 721 | "Ethiopic characters for Amharic and Tigrigna." |
c0e17dd8 KH |
722 | :short-name "Ethiopic" |
723 | :long-name "Ethiopic characters" | |
724 | :iso-final-char ?3 | |
725 | :emacs-mule-id 245 | |
726 | :code-space [33 126 33 126] | |
727 | :code-offset #x1A0000) | |
728 | ||
729 | (define-charset 'mac-roman | |
730 | "Mac Roman charset" | |
731 | :short-name "Mac Roman" | |
732 | :long-name "Mac Roman" | |
733 | :ascii-compatible-p t | |
734 | :code-space [0 255] | |
735 | :map "mac-roman") | |
736 | ||
6ef462e0 DL |
737 | ;; Fixme: modern EBCDIC variants, e.g. IBM00924? |
738 | (define-charset 'ebcdic-us | |
739 | "US version of EBCDIC" | |
740 | :short-name "EBCDIC-US" | |
741 | :long-name "EBCDIC-US" | |
742 | :code-space [0 255] | |
743 | :mime-charset 'ebcdic-us | |
744 | :map "ebcdic-us") | |
745 | ||
746 | (define-charset 'ebcdic-uk | |
747 | "UK version of EBCDIC" | |
748 | :short-name "EBCDIC-UK" | |
749 | :long-name "EBCDIC-UK" | |
750 | :code-space [0 255] | |
751 | :mime-charset 'ebcdic-uk | |
752 | :map "ebcdic-uk") | |
753 | ||
3803079c DL |
754 | (define-charset 'hp-roman8 |
755 | "Encoding used by Hewlet-Packard printer software" | |
756 | :short-name "HP-ROMAN8" | |
757 | :long-name "HP-ROMAN8" | |
758 | :ascii-compatible-p t | |
759 | :code-space [0 255] | |
760 | :map "hp-roman8") | |
761 | ||
762 | (define-charset 'adobe-standard-encoding | |
763 | "Adobe `standard encoding' used in PostScript" | |
764 | :short-name "ADOBE-STANDARD-ENCODING" | |
765 | :long-name "ADOBE-STANDARD-ENCODING" | |
766 | :code-space [0 255] | |
767 | :map "stdenc") | |
768 | ||
769 | (define-charset 'symbol | |
770 | "Adobe symbol encoding used in PostScript" | |
771 | :short-name "ADOBE-SYMBOL" | |
772 | :long-name "ADOBE-SYMBOL" | |
773 | :code-space [0 255] | |
774 | :map "symbol") | |
775 | ||
776 | (define-charset 'ibm850 | |
777 | "DOS codepage 850" | |
778 | :short-name "IBM850" | |
779 | :long-name "IBM850" | |
780 | :code-space [0 255] | |
781 | :map "ibm850") | |
782 | (define-charset-alias 'cp850 'ibm850) | |
783 | ||
c0e17dd8 | 784 | (unify-charset 'chinese-gb2312) |
7c9e1024 | 785 | (unify-charset 'chinese-gbk) |
c0e17dd8 KH |
786 | (unify-charset 'chinese-cns11643-1) |
787 | (unify-charset 'chinese-cns11643-2) | |
788 | (unify-charset 'big5) | |
789 | (unify-charset 'chinese-big5-1) | |
790 | (unify-charset 'chinese-big5-2) | |
65076506 KH |
791 | (unify-charset 'vietnamese-viscii-lower) |
792 | (unify-charset 'vietnamese-viscii-upper) | |
793 | ||
85f789f7 | 794 | \f |
d2a1ee18 KH |
795 | ;; These are tables for translating characters on decoding and |
796 | ;; encoding. | |
c0e17dd8 | 797 | (setq standard-translation-table-for-decode nil) |
08c19a27 | 798 | |
f967223b | 799 | (setq standard-translation-table-for-encode nil) |
08c19a27 | 800 | |
bdf74bef DL |
801 | (defvar translation-table-for-input nil |
802 | "If non-nil, a char table used to translate characters from input methods. | |
803 | \(Currently only used by Quail.)") | |
08c19a27 KH |
804 | \f |
805 | ;;; Make fundamental coding systems. | |
806 | ||
c0e17dd8 KH |
807 | ;; The coding system `no-conversion' is already defined in coding.c as |
808 | ;; below: | |
809 | ;; | |
810 | ;; (define-coding-system 'no-conversion | |
811 | ;; "Do no conversion." | |
812 | ;; :coding-type 'raw-text | |
813 | ;; :mnemonic ?=) | |
08c19a27 | 814 | |
c0e17dd8 KH |
815 | (define-coding-system 'raw-text |
816 | "Raw text, which means text contains random 8-bit codes. | |
817 | Encoding text with this coding system produces the actual byte | |
818 | sequence of the text in buffers and strings. An exception is made for | |
819 | eight-bit-control characters. Each of them is encoded into a single | |
820 | byte. | |
bc6a0946 KH |
821 | |
822 | When you visit a file with this coding, the file is read into a | |
c0e17dd8 KH |
823 | unibyte buffer as is (except for EOL format), thus each byte of a file |
824 | is treated as a character." | |
825 | :coding-type 'raw-text | |
826 | :mnemonic ?t) | |
827 | ||
828 | (define-coding-system 'undecided | |
829 | "No conversion on encoding, automatic conversion on decoding" | |
830 | :coding-type 'undecided | |
831 | :mnemonic ?- | |
832 | :charset-list '(ascii)) | |
08c19a27 | 833 | |
8d969bf6 | 834 | (define-coding-system-alias 'unix 'undecided-unix) |
1c445211 RS |
835 | (define-coding-system-alias 'dos 'undecided-dos) |
836 | (define-coding-system-alias 'mac 'undecided-mac) | |
837 | ||
c0e17dd8 KH |
838 | (define-coding-system 'iso-latin-1 |
839 | "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)." | |
840 | :coding-type 'iso-2022 | |
841 | :mnemonic ?1 | |
842 | :charset-list '(ascii latin-iso8859-1) | |
843 | :designation [ascii latin-iso8859-1 nil nil] | |
844 | :mime-charset 'iso-8859-1) | |
bc6a0946 | 845 | |
c0e17dd8 KH |
846 | (define-coding-system-alias 'iso-8859-1 'iso-latin-1) |
847 | (define-coding-system-alias 'latin-1 'iso-latin-1) | |
08c19a27 | 848 | |
c0e17dd8 | 849 | ;; Coding systems not specific to each language environment. |
bc6a0946 | 850 | |
c0e17dd8 KH |
851 | (define-coding-system 'emacs-mule |
852 | "Emacs 21 internal format used in buffer and string." | |
853 | :coding-type 'emacs-mule | |
7e8b4d67 | 854 | :charset-list 'emacs-mule |
c0e17dd8 KH |
855 | :mnemonic ?M) |
856 | ||
857 | (define-coding-system 'utf-8 | |
858 | "UTF-8." | |
859 | :coding-type 'utf-8 | |
860 | :mnemonic ?U | |
861 | :charset-list '(unicode)) | |
862 | ||
863 | (define-coding-system-alias 'mule-utf-8 'utf-8) | |
864 | ||
865 | (define-coding-system 'utf-8-emacs | |
26dbea99 | 866 | "Support for all Emacs characters (including non-Unicode characters)." |
c0e17dd8 KH |
867 | :coding-type 'utf-8 |
868 | :mnemonic ?U | |
ebc563df DL |
869 | :charset-list '(emacs) |
870 | :mime-charset 'utf-8) | |
c0e17dd8 KH |
871 | |
872 | (define-coding-system 'utf-16 | |
873 | "UTF-16" | |
874 | :coding-type 'utf-16 | |
875 | :mnemonic ?U | |
ebc563df DL |
876 | :charset-list '(unicode) |
877 | :mime-charset 'utf-16) | |
c0e17dd8 KH |
878 | |
879 | (define-coding-system 'utf-16-le-nosig | |
880 | "UTF-16, little endian, no signature" | |
881 | :coding-type 'utf-16 | |
882 | :mnemonic ?U | |
883 | :charset-list '(unicode) | |
884 | :endian 'little) | |
885 | ||
886 | (define-coding-system 'utf-16-be-nosig | |
887 | "UTF-16, big endian, no signature" | |
888 | :coding-type 'utf-16 | |
889 | :mnemonic ?U | |
890 | :charset-list '(unicode) | |
891 | :endian 'big) | |
892 | ||
893 | (define-coding-system 'utf-16-le | |
894 | "UTF-16, little endian, with signature" | |
895 | :coding-type 'utf-16 | |
896 | :mnemonic ?U | |
897 | :charset-list '(unicode) | |
a44cf41b | 898 | :bom t |
ebc563df DL |
899 | :endian 'little |
900 | :mime-charset 'utf-16-le) | |
c0e17dd8 KH |
901 | |
902 | (define-coding-system 'utf-16-be | |
903 | "UTF-16, big endian, with signature" | |
904 | :coding-type 'utf-16 | |
905 | :mnemonic ?U | |
906 | :charset-list '(unicode) | |
a44cf41b | 907 | :bom t |
ebc563df DL |
908 | :endian 'big |
909 | :mime-charset 'utf-16-be) | |
c0e17dd8 KH |
910 | |
911 | (define-coding-system 'iso-2022-7bit | |
912 | "ISO 2022 based 7-bit encoding using only G0" | |
913 | :coding-type 'iso-2022 | |
914 | :mnemonic ?J | |
915 | :charset-list 'iso-2022 | |
916 | :designation [(ascii t) nil nil nil] | |
917 | :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation composition)) | |
918 | ||
919 | (define-coding-system 'iso-2022-7bit-ss2 | |
920 | "ISO 2022 based 7-bit encoding using SS2 for 96-charset" | |
921 | :coding-type 'iso-2022 | |
922 | :mnemonic ?$ | |
923 | :charset-list 'iso-2022 | |
924 | :designation [(ascii 94) nil (nil 96) nil] | |
925 | :flags '(short ascii-at-eol ascii-at-cntl 7-bit | |
926 | designation single-shift composition)) | |
927 | ||
928 | (define-coding-system 'iso-2022-7bit-lock | |
929 | "ISO-2022 coding system using Locking-Shift for 96-charset" | |
930 | :coding-type 'iso-2022 | |
931 | :mnemonic ?& | |
932 | :charset-list 'iso-2022 | |
933 | :designation [(ascii 94) (nil 96) nil nil] | |
934 | :flags '(ascii-at-eol ascii-at-cntl 7-bit | |
935 | designation locking-shift composition)) | |
4951a271 | 936 | |
2e21aa27 | 937 | (define-coding-system-alias 'iso-2022-int-1 'iso-2022-7bit-lock) |
08c19a27 | 938 | |
c0e17dd8 KH |
939 | (define-coding-system 'iso-2022-7bit-lock-ss2 |
940 | "Mixture of ISO-2022-JP, ISO-2022-KR, and ISO-2022-CN" | |
941 | :coding-type 'iso-2022 | |
942 | :mnemonic ?i | |
943 | :charset-list '(ascii | |
944 | japanese-jisx0208 japanese-jisx0208-1978 latin-jisx0201 | |
945 | korean-ksc5601 | |
946 | chinese-gb2312 | |
947 | chinese-cns11643-1 chinese-cns11643-2 chinese-cns11643-3 | |
948 | chinese-cns11643-4 chinese-cns11643-5 chinese-cns11643-6 | |
949 | chinese-cns11643-7) | |
950 | :designation [(ascii 94) | |
951 | (nil korean-ksc5601 chinese-gb2312 chinese-cns11643-1 96) | |
952 | (nil chinese-cns11643-2) | |
953 | (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5 | |
954 | chinese-cns11643-6 chinese-cns11643-7)] | |
955 | :flags '(short ascii-at-eol ascii-at-cntl 7-bit locking-shift | |
956 | single-shift init-bol)) | |
08c19a27 | 957 | |
2e21aa27 | 958 | (define-coding-system-alias 'iso-2022-cjk 'iso-2022-7bit-lock-ss2) |
08c19a27 | 959 | |
c0e17dd8 KH |
960 | (define-coding-system 'iso-2022-8bit-ss2 |
961 | "ISO 2022 based 8-bit encoding using SS2 for 96-charset" | |
962 | :coding-type 'iso-2022 | |
963 | :mnemonic ?@ | |
964 | :charset-list 'iso-2022 | |
965 | :designation [(ascii 94) nil (nil 96) nil] | |
966 | :flags '(ascii-at-eol ascii-at-cntl designation single-shift composition)) | |
08c19a27 | 967 | |
c0e17dd8 KH |
968 | (define-coding-system 'compound-text |
969 | "Compound text based generic encoding for decoding unknown messages. | |
73066974 EZ |
970 | |
971 | This coding system does not support ICCCM Extended Segments." | |
c0e17dd8 KH |
972 | :coding-type 'iso-2022 |
973 | :mnemonic ?x | |
974 | :charset-list 'iso-2022 | |
975 | :designation [(ascii 94) (latin-iso8859-1 katakana-jisx0201 96) nil nil] | |
976 | :flags '(ascii-at-eol ascii-at-cntl | |
977 | designation locking-shift single-shift composition) | |
ebc563df DL |
978 | ;; Fixme: this isn't a valid MIME charset and has to be |
979 | ;; special-cased elsewhere -- fx | |
c0e17dd8 | 980 | :mime-charset 'x-ctext) |
d49a4835 | 981 | |
cb5be6c9 EZ |
982 | (define-coding-system-alias 'x-ctext 'compound-text) |
983 | (define-coding-system-alias 'ctext 'compound-text) | |
73066974 | 984 | |
cb5be6c9 EZ |
985 | ;; Same as compound-text, but doesn't produce composition escape |
986 | ;; sequences. Used in post-read and pre-write conversions of | |
987 | ;; compound-text-with-extensions, see mule.el. Note that this should | |
988 | ;; not have a mime-charset property, to prevent it from showing up | |
989 | ;; close to the beginning of coding systems ordered by priority. | |
c0e17dd8 | 990 | (define-coding-system 'ctext-no-compositions 2 ?x |
73066974 EZ |
991 | "Compound text based generic encoding for decoding unknown messages. |
992 | ||
cb5be6c9 | 993 | Like `compound-text', but does not produce escape sequences for compositions." |
c0e17dd8 KH |
994 | :coding-type 'iso-2022 |
995 | :mnemonic ?x | |
996 | :charset-list 'iso-2022 | |
997 | :designation [(ascii 94) (latin-iso8859-1 katakana-jisx0201 96) nil nil] | |
998 | :flags '(ascii-at-eol ascii-at-cntl | |
999 | designation locking-shift single-shift)) | |
1000 | ||
1001 | (define-coding-system 'compound-text-with-extensions | |
73066974 EZ |
1002 | "Compound text encoding with ICCCM Extended Segment extensions. |
1003 | ||
1004 | This coding system should be used only for X selections. It is inappropriate | |
1005 | for decoding and encoding files, process I/O, etc." | |
c0e17dd8 KH |
1006 | :coding-type 'raw-text |
1007 | :mnemonic ?x | |
1008 | :post-read-conversion 'ctext-post-read-conversion | |
1009 | :pre-write-conversion 'ctext-pre-write-conversion) | |
73066974 | 1010 | |
cb5be6c9 EZ |
1011 | (define-coding-system-alias |
1012 | 'x-ctext-with-extensions 'compound-text-with-extensions) | |
1013 | (define-coding-system-alias | |
1014 | 'ctext-with-extensions 'compound-text-with-extensions) | |
75b6fb58 | 1015 | |
c0e17dd8 KH |
1016 | (define-coding-system 'us-ascii |
1017 | "Convert all characters but ASCII to `?'." | |
1018 | :coding-type 'charset | |
1019 | :mnemonic ?- | |
1020 | :charset-list '(ascii) | |
1021 | :default-char ?? | |
1022 | :mime-charset 'us-ascii) | |
1023 | ||
1024 | (define-coding-system-alias 'iso-safe 'us-ascii) | |
f6eb8ace | 1025 | |
c0e17dd8 | 1026 | ;; Use us-ascii for terminal output if some other coding system is not |
e8dd0160 | 1027 | ;; specified explicitly. |
c0e17dd8 | 1028 | (set-safe-terminal-coding-system-internal 'us-ascii) |
f6eb8ace | 1029 | |
08c19a27 | 1030 | ;; The other coding-systems are defined in each language specific |
c0e17dd8 | 1031 | ;; files under lisp/language. |
08c19a27 | 1032 | |
678dc7ec RS |
1033 | ;; Normally, set coding system to `undecided' before reading a file. |
1034 | ;; Compiled Emacs Lisp files (*.elc) are not decoded at all, | |
1035 | ;; but we regard them as containing multibyte characters. | |
1036 | ;; Tar files are not decoded at all, but we treat them as raw bytes. | |
08c19a27 | 1037 | |
4951a271 | 1038 | (setq file-coding-system-alist |
2238f751 | 1039 | '(("\\.elc\\'" . (emacs-mule . emacs-mule)) |
bdf74bef | 1040 | ("\\.utf\\(-8\\)?\\'" . utf-8) |
3803079c DL |
1041 | ;; This is the defined default for XML documents. It may be |
1042 | ;; overridden by a charset specification in the header. That | |
1043 | ;; should be grokked by the auto-coding mechanism, but rms | |
1044 | ;; vetoed that. -- fx | |
1045 | ("\\.xml\\'" . utf-8) | |
3e88bb50 EZ |
1046 | ;; We use raw-text for reading loaddefs.el so that if it |
1047 | ;; happens to have DOS or Mac EOLs, they are converted to | |
1048 | ;; newlines. This is required to make the special treatment | |
1049 | ;; of the "\ newline" combination in loaddefs.el, which marks | |
1050 | ;; the beginning of a doc string, work. | |
1051 | ("\\(\\`\\|/\\)loaddefs.el\\'" . (raw-text . raw-text-unix)) | |
2238f751 | 1052 | ("\\.tar\\'" . (no-conversion . no-conversion)) |
4951a271 | 1053 | ("" . (undecided . nil)))) |
08c19a27 KH |
1054 | |
1055 | \f | |
1056 | ;;; Setting coding categories and their priorities. | |
1057 | ||
1058 | ;; This setting is just to read an Emacs Lisp source files which | |
1059 | ;; contain multilingual text while dumping Emacs. More appropriate | |
2792ce16 | 1060 | ;; values are set by the command `set-language-environment' for each |
08c19a27 KH |
1061 | ;; language environment. |
1062 | ||
c0e17dd8 KH |
1063 | (set-coding-system-priority |
1064 | 'iso-latin-1 | |
1065 | 'utf-8 | |
1066 | 'iso-2022-7bit | |
1067 | ) | |
08c19a27 | 1068 | |
c1b628eb KH |
1069 | \f |
1070 | ;;; Miscellaneous settings. | |
c1b628eb | 1071 | |
c0e17dd8 KH |
1072 | ;; Make all multibyte characters self-insert. |
1073 | (set-char-table-range (nth 1 global-map) | |
01758abf | 1074 | (cons (decode-char 'ucs 128) (max-char)) |
c0e17dd8 KH |
1075 | 'self-insert-command) |
1076 | ||
1077 | (aset latin-extra-code-table ?\222 t) | |
4cb4b388 | 1078 | |
3803079c DL |
1079 | ;; Local variables: |
1080 | ;; no-byte-compile: t | |
1081 | ;; End: | |
1082 | ||
08c19a27 | 1083 | ;;; mule-conf.el ends here |