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