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