1 ;;; mule-conf.el --- configure multilingual environment
3 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 2001, 2002
6 ;; National Institute of Advanced Industrial Science and Technology (AIST)
7 ;; Registration Number H13PRO009
8 ;; Copyright (C) 2002 Free Software Foundation, Inc.
10 ;; Keywords: i18n, mule, multilingual, character set, coding system
12 ;; This file is part of GNU Emacs.
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)
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.
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.
31 ;; This file defines the Emacs charsets and some basic coding systems.
32 ;; Other coding systems are defined in the files in directory
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/.
43 ;; FWIW, http://www.microsoft.com/globaldev/reference/ lists the
44 ;; following for MS Windows, which are presumably the only charsets we
45 ;; really need to worry about on such systems:
46 ;; `OEM codepages': 437, 720, 737, 775, 850, 852, 855, 857, 858, 862, 866
47 ;; `Windows codepages': 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257,
48 ;; 1258, 874, 932, 936, 949, 950
50 ;;; Definitions of character sets.
52 ;; The charsets `ascii' and `unicode' are already defined in charset.c
55 ;; (define-charset 'ascii
58 ;; :code-space [0 127]
60 ;; :ascii-compatible-p t
64 ;; (define-charset 'unicode
67 ;; :code-space [0 255 0 255 0 16]
68 ;; :ascii-compatible-p t
71 ;; We now set :docstring, :short-name, and :long-name properties.
74 'ascii
:docstring
"ASCII (ISO646 IRV)")
76 'ascii
:short-name
"ASCII")
78 'ascii
:long-name
"ASCII (ISO646 IRV)")
80 'unicode
:docstring
"Unicode (ISO10646)")
82 'unicode
:short-name
"Unicode")
84 'unicode
:long-name
"Unicode (ISO10646)")
86 (define-charset-alias 'ucs
'unicode
)
88 (define-charset 'emacs
89 "Full Emacs characters"
91 :code-space
[ 0 255 0 255 0 63 ]
95 (define-charset 'iso-8859-1
96 "Latin-1 (ISO/IEC 8859-1)"
102 (define-charset 'latin-iso8859-1
103 "Right-Hand Part of ISO/IEC 8859/1 (Latin-1): ISO-IR-100"
104 :short-name
"RHP of Latin-1"
105 :long-name
"RHP of ISO/IEC 8859/1 (Latin-1): ISO-IR-100"
111 (define-charset 'eight-bit-control
112 "8-bit control code (0x80..0x9F)"
113 :short-name
"8-bit control code"
114 :code-space
[128 159]
117 (define-charset 'eight-bit-graphic
118 "8-bit graphic code (0xA0..0xFF)"
119 :short-name
"8-bit graphic code"
120 :code-space
[160 255]
123 (defmacro define-iso-single-byte-charset
(symbol iso-symbol name nickname
127 (define-charset ,symbol
129 :short-name
,nickname
131 :ascii-compatible-p t
135 (define-charset ,iso-symbol
137 (format "Right-Hand Part of %s (%s): ISO-IR-%d"
138 ,name
,nickname
,iso-ir
)
139 (format "Right-Hand Part of %s (%s)" ,name
,nickname
))
140 :short-name
(format "RHP of %s" ,name
)
141 :long-name
(format "RHP of %s (%s)" ,name
,nickname
)
142 :iso-final-char
,iso-final
143 :emacs-mule-id
,emacs-mule-id
145 :parents
(list (cons ,symbol
128))))))
147 (define-iso-single-byte-charset 'iso-8859-2
'latin-iso8859-2
148 "ISO/IEC 8859/2" "Latin-2" 101 ?B
130 "8859-2")
150 (define-iso-single-byte-charset 'iso-8859-3
'latin-iso8859-3
151 "ISO/IEC 8859/3" "Latin-3" 109 ?C
131 "8859-3")
153 (define-iso-single-byte-charset 'iso-8859-4
'latin-iso8859-4
154 "ISO/IEC 8859/4" "Latin-4" 110 ?D
132 "8859-4")
156 (define-iso-single-byte-charset 'iso-8859-5
'cyrillic-iso8859-5
157 "ISO/IEC 8859/5" "Latin/Cyrillic" 144 ?L
140 "8859-5")
159 (define-iso-single-byte-charset 'iso-8859-6
'arabic-iso8859-6
160 "ISO/IEC 8859/6" "Latin/Arabic" 127 ?G
135 "8859-6")
162 (define-iso-single-byte-charset 'iso-8859-7
'greek-iso8859-7
163 "ISO/IEC 8859/7" "Latin/Greek" 126 ?F
134 "8859-7")
165 (define-iso-single-byte-charset 'iso-8859-8
'hebrew-iso8859-8
166 "ISO/IEC 8859/8" "Latin/Hebrew" 138 ?H
136 "8859-8")
168 (define-iso-single-byte-charset 'iso-8859-9
'latin-iso8859-9
169 "ISO/IEC 8859/9" "Latin-5" 148 ?M
141 "8859-9")
171 (define-iso-single-byte-charset 'iso-8859-10
'latin-iso8859-10
172 "ISO/IEC 8859/10" "Latin-6" 157 ?V nil
"8859-10")
174 ;; http://www.nectec.or.th/it-standards/iso8859-11/
175 ;; http://www.cwi.nl/~dik/english/codes/8859.html says this is tis-620
177 (define-iso-single-byte-charset 'iso-8859-11
'thai-iso8859-11
178 "ISO/IEC 8859/11" "Latin/Thai" 166 ?T nil
"8859-11")
180 ;; 8859-12 doesn't (yet?) exist.
182 (define-iso-single-byte-charset 'iso-8859-13
'latin-iso8859-13
183 "ISO/IEC 8859/13" "Latin-7" 179 ?Y nil
"8859-13")
185 (define-iso-single-byte-charset 'iso-8859-14
'latin-iso8859-14
186 "ISO/IEC 8859/14" "Latin-8" 199 ?_
143 "8859-14")
188 (define-iso-single-byte-charset 'iso-8859-15
'latin-iso8859-15
189 "ISO/IEC 8859/15" "Latin-9" 203 ?b
142 "8859-15")
191 (define-iso-single-byte-charset 'iso-8859-16
'latin-iso8859-16
192 "ISO/IEC 8859/16" "Latin-10" 226 ?f nil
"8859-16")
194 ;; No point in keeping it around.
195 (fmakunbound 'define-iso-single-byte-charset
)
197 ;; Can this be shared with 8859-11?
198 (define-charset 'thai-tis620
200 :short-name
"TIS620.2533"
206 ;; Fixme: doc for this, c.f. above
207 (define-charset 'tis620-2533
209 :short-name
"TIS620.2533"
210 :ascii-compatible-p t
212 :parents
'(ascii eight-bit-control
(thai-tis620 . -
128)))
214 (define-charset 'jisx0201
216 :short-name
"JISX0201"
220 (define-charset 'latin-jisx0201
221 "Roman Part of JISX0201.1976"
222 :short-name
"JISX0201 Roman"
223 :long-name
"Japanese Roman (JISX0201.1976)"
227 :parents
'(jisx0201))
229 (define-charset 'katakana-jisx0201
230 "Katakana Part of JISX0201.1976"
231 :short-name
"JISX0201 Katakana"
232 :long-name
"Japanese Katakana (JISX0201.1976)"
236 :parents
'((jisx0201 .
#x80
)))
238 (define-charset 'chinese-gb2312
239 "GB2312 Chinese simplified: ISO-IR-58"
241 :long-name
"GB2312: ISO-IR-58"
244 :code-space
[33 126 33 126]
245 :code-offset
#x110000
246 :unify-map
"gb2312-1980")
248 (define-charset 'chinese-gbk
249 "GBK Chinese simplified."
251 :code-space
[#x40
#xFE
#x81
#xFE
]
252 :code-offset
#x160000
254 (define-charset-alias 'cp936
'chinese-gbk
)
256 (define-charset 'chinese-cns11643-1
257 "CNS11643 Plane 1 Chinese traditional: ISO-IR-171"
258 :short-name
"CNS11643-1"
259 :long-name
"CNS11643-1 (Chinese traditional): ISO-IR-171"
262 :code-space
[33 126 33 126]
263 :code-offset
#x114000
264 :unify-map
"cns11643-1")
266 (define-charset 'chinese-cns11643-2
267 "CNS11643 Plane 2 Chinese traditional: ISO-IR-172"
268 :short-name
"CNS11643-2"
269 :long-name
"CNS11643-2 (Chinese traditional): ISO-IR-172"
272 :code-space
[33 126 33 126]
273 :code-offset
#x118000
274 :unify-map
"cns11643-2")
276 (define-charset 'chinese-cns11643-3
277 "CNS11643 Plane 3 Chinese Traditional: ISO-IR-183"
278 :short-name
"CNS11643-3"
279 :long-name
"CNS11643-3 (Chinese traditional): ISO-IR-183"
281 :code-space
[33 126 33 126]
283 :code-offset
#x11C000
)
285 (define-charset 'chinese-cns11643-4
286 "CNS11643 Plane 4 Chinese Traditional: ISO-IR-184"
287 :short-name
"CNS11643-4"
288 :long-name
"CNS11643-4 (Chinese traditional): ISO-IR-184"
291 :code-space
[33 126 33 126]
292 :code-offset
#x120000
)
294 (define-charset 'chinese-cns11643-5
295 "CNS11643 Plane 5 Chinese Traditional: ISO-IR-185"
296 :short-name
"CNS11643-5"
297 :long-name
"CNS11643-5 (Chinese traditional): ISO-IR-185"
300 :code-space
[33 126 33 126]
301 :code-offset
#x124000
)
303 (define-charset 'chinese-cns11643-6
304 "CNS11643 Plane 6 Chinese Traditional: ISO-IR-186"
305 :short-name
"CNS11643-6"
306 :long-name
"CNS11643-6 (Chinese traditional): ISO-IR-186"
309 :code-space
[33 126 33 126]
310 :code-offset
#x128000
)
312 (define-charset 'chinese-cns11643-7
313 "CNS11643 Plane 7 Chinese Traditional: ISO-IR-187"
314 :short-name
"CNS11643-7"
315 :long-name
"CNS11643-7 (Chinese traditional): ISO-IR-187"
318 :code-space
[33 126 33 126]
319 :code-offset
#x12C000
)
321 (define-charset 'big5
322 "Big5 (Chinese traditional)"
324 :code-space
[#x40
#xFE
#xA1
#xFE
]
325 :code-offset
#x130000
327 ;; Fixme: AKA cp950 according to
328 ;; <URL:http://www.microsoft.com/globaldev/reference/WinCP.asp>. Is
331 (define-charset 'chinese-big5-1
332 "Frequently used part (A141-C67E) of Big5 (Chinese traditional)"
333 :short-name
"Big5 (Level-1)"
334 :long-name
"Big5 (Level-1) A141-C67F"
337 :code-space
[#x21
#x7E
#x21
#x7E
]
338 :code-offset
#x135000
341 (define-charset 'chinese-big5-2
342 "Less frequently used part (C940-FEFE) of Big5 (Chinese traditional)"
343 :short-name
"Big5 (Level-2)"
344 :long-name
"Big5 (Level-2) C940-FEFE"
347 :code-space
[#x21
#x7E
#x21
#x7E
]
348 :code-offset
#x137800
351 (define-charset 'japanese-jisx0208
352 "JISX0208.1983/1990 Japanese Kanji: ISO-IR-87"
353 :short-name
"JISX0208"
354 :long-name
"JISX0208.1983/1990 (Japanese): ISO-IR-87"
357 :code-space
[33 126 33 126]
358 :code-offset
#x140000
359 :unify-map
"jisx0208-1990")
361 (define-charset 'japanese-jisx0208-1978
362 "JISX0208.1978 Japanese Kanji (so called \"old JIS\"): ISO-IR-42"
363 :short-name
"JISX0208.1978"
364 :long-name
"JISX0208.1978 (Japanese): ISO-IR-42"
367 :code-space
[33 126 33 126]
368 :code-offset
#x144000
369 :unify-map
"jisx0208-1978")
371 (define-charset 'japanese-jisx0212
372 "JISX0212 Japanese supplement: ISO-IR-159"
373 :short-name
"JISX0212"
374 :long-name
"JISX0212 (Japanese): ISO-IR-159"
377 :code-space
[33 126 33 126]
378 :code-offset
#x148000
379 :unify-map
"jisx0212-1990")
381 (define-charset 'japanese-jisx0213-1
382 "JISX0213 Plane 1 (Japanese)"
383 :short-name
"JISX0213-1"
386 :code-space
[33 126 33 126]
387 :code-offset
#x14C000
)
389 (define-charset 'japanese-jisx0213-2
390 "JISX0213 Plane 2 (Japanese)"
391 :short-name
"JISX0213-2"
394 :code-space
[33 126 33 126]
395 :code-offset
#x150000
)
397 (define-charset 'korean-ksc5601
398 "KSC5601 Korean Hangul and Hanja: ISO-IR-149"
399 :short-name
"KSC5601"
400 :long-name
"KSC5601 (Korean): ISO-IR-149"
403 :code-space
[33 126 33 126]
406 ;; Fixme: Korean cp949/UHC
408 (define-charset 'chinese-sisheng
409 "SiSheng characters for PinYin/ZhuYin"
410 :short-name
"SiSheng"
411 :long-name
"SiSheng (PinYin/ZhuYin)"
416 :code-offset
#x200000
)
419 "IPA (International Phonetic Association)"
425 :code-offset
#x200080
)
427 (define-charset 'viscii
430 :long-name
"VISCII 1.1"
434 (define-charset 'vietnamese-viscii-lower
435 "VISCII1.1 lower-case"
436 :short-name
"VISCII lower"
437 :long-name
"VISCII lower-case"
441 :code-offset
#x200200
442 :unify-map
"viscii-lower")
444 (define-charset 'vietnamese-viscii-upper
445 "VISCII1.1 upper-case"
446 :short-name
"VISCII upper"
447 :long-name
"VISCII upper-case"
451 :code-offset
#x200280
452 :unify-map
"viscii-upper")
454 (define-charset 'vscii
460 (define-charset 'koi8-r
463 :ascii-compatible-p t
467 (define-charset-alias 'koi8
'koi8-r
)
469 (define-charset 'alternativnyj
471 :short-name
"alternativnyj"
472 :ascii-compatible-p t
475 ;; Fixme: http://czyborra.com/charsets/cyrillic.html says the
476 ;; following, but the iconv map for cp866 isn't the same as his chart
477 ;; for alternativnyj. I can't find anything that looks like an
478 ;; official definition of alternativnyj.
479 (define-charset-alias 'cp866
'alternativnyj
)
480 (define-charset-alias 'ibm866
'alternativnyj
)
482 (define-charset 'koi8-u
485 :ascii-compatible-p t
489 (define-charset 'koi8-t
492 :ascii-compatible-p t
496 (define-charset 'georgian-ps
498 :short-name
"GEORGIAN-PS"
499 :ascii-compatible-p t
503 (define-charset 'windows-1250
504 "WINDOWS-1250 (Central Europe)"
505 :short-name
"WINDOWS-1250"
506 :ascii-compatible-p t
509 (define-charset-alias 'cp1250
'windows-1250
)
511 (define-charset 'windows-1251
512 "WINDOWS-1251 (Cyrillic)"
513 :short-name
"WINDOWS-1251"
514 :ascii-compatible-p t
517 (define-charset-alias 'cp1251
'windows-1251
)
519 (define-charset 'windows-1252
520 "WINDOWS-1252 (Latin I)"
521 :short-name
"WINDOWS-1252"
522 :ascii-compatible-p t
525 (define-charset-alias 'cp1252
'windows-1252
)
527 (define-charset 'windows-1253
528 "WINDOWS-1253 (Greek)"
529 :short-name
"WINDOWS-1253"
530 :ascii-compatible-p t
533 (define-charset-alias 'cp1253
'windows-1253
)
535 (define-charset 'windows-1254
536 "WINDOWS-1254 (Turkish)"
537 :short-name
"WINDOWS-1254"
538 :ascii-compatible-p t
541 (define-charset-alias 'cp1254
'windows-1254
)
543 (define-charset 'windows-1255
544 "WINDOWS-1255 (Hebrew)"
545 :short-name
"WINDOWS-1255"
546 :ascii-compatible-p t
549 (define-charset-alias 'cp1255
'windows-1255
)
551 (define-charset 'windows-1256
552 "WINDOWS-1256 (Arabic)"
553 :short-name
"WINDOWS-1256"
554 :ascii-compatible-p t
557 (define-charset-alias 'cp1256
'windows-1256
)
559 (define-charset 'windows-1257
560 "WINDOWS-1257 (Baltic)"
561 :short-name
"WINDOWS-1257"
562 :ascii-compatible-p t
565 (define-charset-alias 'cp1257
'windows-1257
)
567 (define-charset 'windows-1258
568 "WINDOWS-1258 (Viet Nam)"
569 :short-name
"WINDOWS-1258"
570 :ascii-compatible-p t
573 (define-charset-alias 'cp1258
'windows-1258
)
575 (define-charset 'next
578 :ascii-compatible-p t
582 (define-charset 'cp1125
587 (define-charset-alias 'ruscii
'cp1125
)
588 ;; Original name for cp1125, says Serhii Hlodin <hlodin@lutsk.bank.gov.ua>
589 (define-charset-alias 'cp866u
'cp1125
)
591 ;; Fixme: C.f. iconv, http://czyborra.com/charsets/codepages.html
592 ;; shows this as not ASCII comptaible, with various graphics in
594 (define-charset 'cp437
595 "CP437 (MS-DOS United States, Australia, New Zealand, South Africa)"
598 :ascii-compatible-p t
601 (define-charset 'cp720
605 :ascii-compatible-p t
608 (define-charset 'cp737
612 :ascii-compatible-p t
615 (define-charset 'cp775
619 :ascii-compatible-p t
622 (define-charset 'cp851
626 :ascii-compatible-p t
629 (define-charset 'cp852
630 "CP852 (MS-DOS Latin-2)"
633 :ascii-compatible-p t
636 (define-charset 'cp855
637 "CP855 (IBM Cyrillic)"
640 :ascii-compatible-p t
643 (define-charset 'cp857
644 "CP857 (IBM Turkish)"
647 :ascii-compatible-p t
650 (define-charset 'cp858
651 "CP858 (Multilingual Latin I + Euro)"
654 :ascii-compatible-p t
656 (define-charset-alias 'cp00858
'cp858
) ; IANA has IBM00858/CP00858
658 (define-charset 'cp860
659 "CP860 (MS-DOS Portuguese)"
662 :ascii-compatible-p t
665 (define-charset 'cp861
666 "CP861 (MS-DOS Icelandic)"
669 :ascii-compatible-p t
672 (define-charset 'cp862
676 :ascii-compatible-p t
679 (define-charset 'cp863
680 "CP863 (MS-DOS Canadian French)"
683 :ascii-compatible-p t
686 (define-charset 'cp864
690 :ascii-compatible-p t
693 (define-charset 'cp865
694 "CP865 (MS-DOS Nordic)"
697 :ascii-compatible-p t
700 (define-charset 'cp869
701 "CP869 (IBM Modern Greek)"
704 :ascii-compatible-p t
707 (define-charset 'cp874
711 :ascii-compatible-p t
714 ;; For Arabic, we need three different types of character sets.
715 ;; Digits are of direction left-to-right and of width 1-column.
716 ;; Others are of direction right-to-left and of width 1-column or
718 (define-charset 'arabic-digit
720 :short-name
"Arabic digit"
726 (define-charset 'arabic-1-column
728 :short-name
"Arabic 1-col"
729 :long-name
"Arabic 1-column"
733 :code-offset
#x200100
)
735 (define-charset 'arabic-2-column
737 :short-name
"Arabic 2-col"
738 :long-name
"Arabic 2-column"
742 :code-offset
#x200180
)
745 ;; Codes 0x21..0x7E are mapped to Unicode U+0E81..U+0EDF.
747 "Lao characters (ISO10646 0E81..0EDF)"
754 (define-charset 'mule-lao
755 "Lao characters (ISO10646 0E81..0EDF)"
758 :parents
'(ascii eight-bit-control
(lao . -
128)))
761 ;; Indian scripts. Symbolic charset for data exchange. Glyphs are
762 ;; not assigned. They are automatically converted to each Indian
763 ;; script which IS-13194 supports.
765 (define-charset 'indian-is13194
766 "Generic Indian charset for data exchange with IS 13194"
767 :short-name
"IS 13194"
768 :long-name
"Indian IS 13194"
773 :code-offset
#x180000
)
775 (define-charset 'indian-glyph
776 "Glyphs for Indian characters."
777 :short-name
"Indian glyph"
780 :code-space
[32 127 32 127]
781 :code-offset
#x180100
)
783 ;; Actual Glyph for 1-column width.
784 (define-charset 'indian-1-column
785 "Indian charset for 1-column width glyphs"
786 :short-name
"Indian 1-col"
787 :long-name
"Indian 1 Column"
790 :code-space
[33 126 33 126]
791 :code-offset
#x184000
)
793 ;; Actual Glyph for 2-column width.
794 (define-charset 'indian-2-column
795 "Indian charset for 2-column width glyphs"
796 :short-name
"Indian 2-col"
797 :long-name
"Indian 2 Column"
800 :code-space
[33 126 33 126]
801 :parents
'(indian-1-column))
803 (define-charset 'tibetan
806 :short-name
"Tibetan 2-col"
807 :long-name
"Tibetan 2 column"
811 :code-space
[33 126 33 126]
812 :code-offset
#x190000
)
814 (define-charset 'tibetan-1-column
815 "Tibetan 1 column glyph"
816 :short-name
"Tibetan 1-col"
817 :long-name
"Tibetan 1 column"
820 :code-space
[33 126 33 37]
823 ;; Subsets of Unicode.
824 (define-charset 'mule-unicode-2500-33ff
825 "Unicode characters of the range U+2500..U+33FF."
826 :short-name
"Unicode subset 2"
827 :long-name
"Unicode subset (U+2500..U+33FF)"
830 :code-space
[#x20
#x7f
#x20
#x47
]
833 (define-charset 'mule-unicode-e000-ffff
834 "Unicode characters of the range U+E000..U+FFFF."
835 :short-name
"Unicode subset 3"
836 :long-name
"Unicode subset (U+E000+FFFF)"
839 :code-space
[#x20
#x7F
#x20
#x75
]
842 (define-charset 'mule-unicode-0100-24ff
843 "Unicode characters of the range U+0100..U+24FF."
844 :short-name
"Unicode subset"
845 :long-name
"Unicode subset (U+0100..U+24FF)"
848 :code-space
[#x20
#x7F
#x20
#x7F
]
851 (define-charset 'ethiopic
852 "Ethiopic characters for Amharic and Tigrigna."
853 :short-name
"Ethiopic"
854 :long-name
"Ethiopic characters"
857 :unify-map
"ethiopic"
858 :code-space
[33 126 33 126]
859 :code-offset
#x1A0000
)
861 (define-charset 'mac-roman
863 :short-name
"Mac Roman"
864 :ascii-compatible-p t
868 ;; Fixme: modern EBCDIC variants, e.g. IBM00924?
869 (define-charset 'ebcdic-us
870 "US version of EBCDIC"
871 :short-name
"EBCDIC-US"
873 :mime-charset
'ebcdic-us
876 (define-charset 'ebcdic-uk
877 "UK version of EBCDIC"
878 :short-name
"EBCDIC-UK"
880 :mime-charset
'ebcdic-uk
883 (define-charset 'hp-roman8
884 "Encoding used by Hewlet-Packard printer software"
885 :short-name
"HP-ROMAN8"
886 :ascii-compatible-p t
890 ;; To make a coding system with this, a pre-write-conversion should
891 ;; account for the commented-out multi-valued code points in
893 (define-charset 'adobe-standard-encoding
894 "Adobe `standard encoding' used in PostScript"
895 :short-name
"ADOBE-STANDARD-ENCODING"
896 :code-space
[#x20
255]
899 (define-charset 'symbol
900 "Adobe symbol encoding used in PostScript"
901 :short-name
"ADOBE-SYMBOL"
902 :code-space
[#x20
255]
905 (define-charset 'ibm850
906 "DOS codepage 850 (Latin-1)"
908 :ascii-compatible-p t
911 (define-charset-alias 'cp850
'ibm850
)
913 (define-charset 'gb18030-2-byte
914 "GB18030 2-byte (0x814E..0xFEFE)"
915 :code-space
[#x40
#xFE
#x81
#xFE
]
919 (define-charset 'gb18030-4-byte-bmp
920 "GB18030 4-byte for BMP (0x81308130-0x8431A439)"
921 :code-space
[#x30
#x39
#x81
#xFE
#x30
#x39
#x81
#x84
]
925 (define-charset 'gb18030-4-byte-smp
926 "GB18030 4-byte for SMP (0x90308130-0xE3329A35)"
927 :code-space
[#x30
#x39
#x81
#xFE
#x30
#x39
#x90
#xE3
]
928 :min-code
'(#x9030 .
#x8130
)
929 :max-code
'(#xE332 .
#x9A35
)
931 :code-offset
#x10000
)
933 (define-charset 'gb18030-4-byte-ext-1
934 "GB18030 4-byte (0x8431A530-0x8F39FE39)"
935 :code-space
[#x30
#x39
#x81
#xFE
#x30
#x39
#x84
#x8F
]
936 :min-code
'(#x8431 .
#xA530
)
937 :max-code
'(#x8F39 .
#xFE39
)
939 :code-offset
#x200000
; ... #x22484B
942 (define-charset 'gb18030-4-byte-ext-2
943 "GB18030 4-byte (0xE3329A36-0xFE39FE39)"
944 :code-space
[#x30
#x39
#x81
#xFE
#x30
#x39
#xE3
#xFE
]
945 :min-code
'(#xE332 .
#x9A36
)
946 :max-code
'(#xFE39 .
#xFE39
)
948 :code-offset
#X22484C
; ... #x279f93
951 (define-charset 'gb18030
953 :code-space
[#x00
#xFF
#x00
#xFE
#x00
#xFE
#x00
#xFE
]
955 :max-code
'(#xFE39 .
#xFE39
)
956 :parents
'(ascii gb18030-2-byte
957 gb18030-4-byte-bmp gb18030-4-byte-smp
958 gb18030-4-byte-ext-1 gb18030-4-byte-ext-2
))
960 (unify-charset 'chinese-gb2312
)
961 (unify-charset 'chinese-gbk
)
962 (unify-charset 'chinese-cns11643-1
)
963 (unify-charset 'chinese-cns11643-2
)
964 (unify-charset 'big5
)
965 (unify-charset 'chinese-big5-1
)
966 (unify-charset 'chinese-big5-2
)
967 (unify-charset 'vietnamese-viscii-lower
)
968 (unify-charset 'vietnamese-viscii-upper
)
969 ;; (unify-charset 'chinese-sisheng)
970 ;; (unify-charset 'ipa)
971 ;; (unify-charset 'indian-is13194)
972 ;; (unify-charset 'tibetan)
973 ;; (unify-charset 'ethiopic)
974 ;; (unify-charset 'japanese-jisx0208-1978)
975 ;; (unify-charset 'japanese-jisx0208)
976 ;; (unify-charset 'japanese-jisx0212)
979 ;; These are tables for translating characters on decoding and
981 (setq standard-translation-table-for-decode nil
)
983 (setq standard-translation-table-for-encode nil
)
985 (defvar translation-table-for-input nil
986 "If non-nil, a char table used to translate characters from input methods.
987 \(Currently only used by Quail.)")
989 ;;; Make fundamental coding systems.
991 ;; The coding system `no-conversion' is already defined in coding.c as
994 ;; (define-coding-system 'no-conversion
995 ;; "Do no conversion."
996 ;; :coding-type 'raw-text
999 (define-coding-system-alias 'binary
'no-conversion
)
1001 (define-coding-system 'raw-text
1002 "Raw text, which means text contains random 8-bit codes.
1003 Encoding text with this coding system produces the actual byte
1004 sequence of the text in buffers and strings. An exception is made for
1005 eight-bit-control characters. Each of them is encoded into a single
1008 When you visit a file with this coding, the file is read into a
1009 unibyte buffer as is (except for EOL format), thus each byte of a file
1010 is treated as a character."
1011 :coding-type
'raw-text
1014 (define-coding-system 'undecided
1015 "No conversion on encoding, automatic conversion on decoding."
1016 :coding-type
'undecided
1018 :charset-list
'(ascii))
1020 (define-coding-system-alias 'unix
'undecided-unix
)
1021 (define-coding-system-alias 'dos
'undecided-dos
)
1022 (define-coding-system-alias 'mac
'undecided-mac
)
1024 (define-coding-system 'iso-latin-1
1025 "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)."
1026 :coding-type
'iso-2022
1028 :charset-list
'(ascii latin-iso8859-1
)
1029 :designation
[ascii latin-iso8859-1 nil nil
]
1030 :mime-charset
'iso-8859-1
)
1032 (define-coding-system-alias 'iso-8859-1
'iso-latin-1
)
1033 (define-coding-system-alias 'latin-1
'iso-latin-1
)
1035 ;; Coding systems not specific to each language environment.
1037 (define-coding-system 'emacs-mule
1038 "Emacs 21 internal format used in buffer and string."
1039 :coding-type
'emacs-mule
1040 :charset-list
'emacs-mule
1043 (define-coding-system 'utf-8
1047 :charset-list
'(unicode))
1049 (define-coding-system-alias 'mule-utf-8
'utf-8
)
1051 (define-coding-system 'utf-8-emacs
1052 "Support for all Emacs characters (including non-Unicode characters)."
1055 :charset-list
'(emacs)
1056 :mime-charset
'utf-8
)
1058 (define-coding-system 'utf-16
1060 :coding-type
'utf-16
1062 :charset-list
'(unicode)
1063 :mime-charset
'utf-16
)
1065 (define-coding-system 'utf-16-le-nosig
1066 "UTF-16, little endian, no signature."
1067 :coding-type
'utf-16
1069 :charset-list
'(unicode)
1072 (define-coding-system 'utf-16-be-nosig
1073 "UTF-16, big endian, no signature."
1074 :coding-type
'utf-16
1076 :charset-list
'(unicode)
1079 (define-coding-system 'utf-16-le
1080 "UTF-16, little endian, with signature."
1081 :coding-type
'utf-16
1083 :charset-list
'(unicode)
1086 :mime-charset
'utf-16-le
)
1088 (define-coding-system 'utf-16-be
1089 "UTF-16, big endian, with signature."
1090 :coding-type
'utf-16
1092 :charset-list
'(unicode)
1095 :mime-charset
'utf-16-be
)
1097 (define-coding-system 'iso-2022-7bit
1098 "ISO 2022 based 7-bit encoding using only G0."
1099 :coding-type
'iso-2022
1101 :charset-list
'iso-2022
1102 :designation
[(ascii t
) nil nil nil
]
1103 :flags
'(short ascii-at-eol ascii-at-cntl
7-bit designation composition
))
1105 (define-coding-system 'iso-2022-7bit-ss2
1106 "ISO 2022 based 7-bit encoding using SS2 for 96-charset."
1107 :coding-type
'iso-2022
1109 :charset-list
'iso-2022
1110 :designation
[(ascii 94) nil
(nil 96) nil
]
1111 :flags
'(short ascii-at-eol ascii-at-cntl
7-bit
1112 designation single-shift composition
))
1114 (define-coding-system 'iso-2022-7bit-lock
1115 "ISO-2022 coding system using Locking-Shift for 96-charset."
1116 :coding-type
'iso-2022
1118 :charset-list
'iso-2022
1119 :designation
[(ascii 94) (nil 96) nil nil
]
1120 :flags
'(ascii-at-eol ascii-at-cntl
7-bit
1121 designation locking-shift composition
))
1123 (define-coding-system-alias 'iso-2022-int-1
'iso-2022-7bit-lock
)
1125 (define-coding-system 'iso-2022-7bit-lock-ss2
1126 "Mixture of ISO-2022-JP, ISO-2022-KR, and ISO-2022-CN."
1127 :coding-type
'iso-2022
1129 :charset-list
'(ascii
1130 japanese-jisx0208 japanese-jisx0208-1978 latin-jisx0201
1133 chinese-cns11643-1 chinese-cns11643-2 chinese-cns11643-3
1134 chinese-cns11643-4 chinese-cns11643-5 chinese-cns11643-6
1136 :designation
[(ascii 94)
1137 (nil korean-ksc5601 chinese-gb2312 chinese-cns11643-1
96)
1138 (nil chinese-cns11643-2
)
1139 (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
1140 chinese-cns11643-6 chinese-cns11643-7
)]
1141 :flags
'(short ascii-at-eol ascii-at-cntl
7-bit locking-shift
1142 single-shift init-bol
))
1144 (define-coding-system-alias 'iso-2022-cjk
'iso-2022-7bit-lock-ss2
)
1146 (define-coding-system 'iso-2022-8bit-ss2
1147 "ISO 2022 based 8-bit encoding using SS2 for 96-charset."
1148 :coding-type
'iso-2022
1150 :charset-list
'iso-2022
1151 :designation
[(ascii 94) nil
(nil 96) nil
]
1152 :flags
'(ascii-at-eol ascii-at-cntl designation single-shift composition
))
1154 (define-coding-system 'compound-text
1155 "Compound text based generic encoding for decoding unknown messages.
1157 This coding system does not support ICCCM Extended Segments."
1158 :coding-type
'iso-2022
1160 :charset-list
'iso-2022
1161 :designation
[(ascii 94) (latin-iso8859-1 katakana-jisx0201
96) nil nil
]
1162 :flags
'(ascii-at-eol ascii-at-cntl
1163 designation locking-shift single-shift composition
)
1164 ;; Fixme: this isn't a valid MIME charset and has to be
1165 ;; special-cased elsewhere -- fx
1166 :mime-charset
'x-ctext
)
1168 (define-coding-system-alias 'x-ctext
'compound-text
)
1169 (define-coding-system-alias 'ctext
'compound-text
)
1171 ;; Same as compound-text, but doesn't produce composition escape
1172 ;; sequences. Used in post-read and pre-write conversions of
1173 ;; compound-text-with-extensions, see mule.el. Note that this should
1174 ;; not have a mime-charset property, to prevent it from showing up
1175 ;; close to the beginning of coding systems ordered by priority.
1176 (define-coding-system 'ctext-no-compositions
2 ?x
1177 "Compound text based generic encoding for decoding unknown messages.
1179 Like `compound-text', but does not produce escape sequences for compositions."
1180 :coding-type
'iso-2022
1182 :charset-list
'iso-2022
1183 :designation
[(ascii 94) (latin-iso8859-1 katakana-jisx0201
96) nil nil
]
1184 :flags
'(ascii-at-eol ascii-at-cntl
1185 designation locking-shift single-shift
))
1187 (define-coding-system 'compound-text-with-extensions
1188 "Compound text encoding with ICCCM Extended Segment extensions.
1190 This coding system should be used only for X selections. It is inappropriate
1191 for decoding and encoding files, process I/O, etc."
1192 :coding-type
'raw-text
1194 :post-read-conversion
'ctext-post-read-conversion
1195 :pre-write-conversion
'ctext-pre-write-conversion
)
1197 (define-coding-system-alias
1198 'x-ctext-with-extensions
'compound-text-with-extensions
)
1199 (define-coding-system-alias
1200 'ctext-with-extensions
'compound-text-with-extensions
)
1202 (define-coding-system 'us-ascii
1203 "Convert all characters but ASCII to `?'."
1204 :coding-type
'charset
1206 :charset-list
'(ascii)
1208 :mime-charset
'us-ascii
)
1210 (define-coding-system-alias 'iso-safe
'us-ascii
)
1212 ;; Use us-ascii for terminal output if some other coding system is not
1213 ;; specified explicitly.
1214 (set-safe-terminal-coding-system-internal 'us-ascii
)
1216 ;; The other coding-systems are defined in each language specific
1217 ;; files under lisp/language.
1219 ;; Normally, set coding system to `undecided' before reading a file.
1220 ;; Compiled Emacs Lisp files (*.elc) are not decoded at all,
1221 ;; but we regard them as containing multibyte characters.
1222 ;; Tar files are not decoded at all, but we treat them as raw bytes.
1224 (setq file-coding-system-alist
1225 '(("\\.elc\\'" .
(emacs-mule . emacs-mule
))
1226 ("\\.utf\\(-8\\)?\\'" . utf-8
)
1227 ;; This is the defined default for XML documents. It may be
1228 ;; overridden by a charset specification in the header. That
1229 ;; should be grokked by the auto-coding mechanism, but rms
1230 ;; vetoed that. -- fx
1231 ("\\.xml\\'" . utf-8
)
1232 ;; We use raw-text for reading loaddefs.el so that if it
1233 ;; happens to have DOS or Mac EOLs, they are converted to
1234 ;; newlines. This is required to make the special treatment
1235 ;; of the "\ newline" combination in loaddefs.el, which marks
1236 ;; the beginning of a doc string, work.
1237 ("\\(\\`\\|/\\)loaddefs.el\\'" .
(raw-text . raw-text-unix
))
1238 ("\\.tar\\'" .
(no-conversion . no-conversion
))
1239 ("" .
(undecided . nil
))))
1242 ;;; Setting coding categories and their priorities.
1244 ;; This setting is just to read an Emacs Lisp source files which
1245 ;; contain multilingual text while dumping Emacs. More appropriate
1246 ;; values are set by the command `set-language-environment' for each
1247 ;; language environment.
1249 (set-coding-system-priority
1256 ;;; Miscellaneous settings.
1258 ;; Make all multibyte characters self-insert.
1259 (set-char-table-range (nth 1 global-map
)
1260 (cons 128 (max-char))
1261 'self-insert-command
)
1263 (aset latin-extra-code-table ?
\222 t
)
1265 ;; Move least specific charsets to end of priority list
1267 (apply #'set-charset-priority
1268 (delq 'unicode
(delq 'emacs
(charset-priority-list))))
1270 ;; The old code-pages library is obsoleted by coding systems based on
1271 ;; the charsets defined in this file but might be required by user
1273 (provide 'code-pages
)
1276 ;; no-byte-compile: t
1279 ;;; mule-conf.el ends here