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