1 ;;; mule-conf.el --- configure multilingual environment
3 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003,
4 ;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
6 ;; National Institute of Advanced Industrial Science and Technology (AIST)
7 ;; Registration Number H14PRO021
9 ;; National Institute of Advanced Industrial Science and Technology (AIST)
10 ;; Registration Number H13PRO009
12 ;; Keywords: i18n, mule, multilingual, character set, coding system
14 ;; This file is part of GNU Emacs.
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 3 of the License, or
19 ;; (at your option) any later version.
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.
26 ;; You should have received a copy of the GNU General Public License
27 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
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/ lists the following for
44 ;; MS Windows, which are presumably the only charsets we really need
45 ;; 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', `unicode' and `eight-bit' are already defined
53 ;; in charset.c as below:
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 ;; (define-charset 'eight-bit
74 ;; :code-space [128 255]
75 ;; :code-offset #x3FFF80)
77 ;; We now set :docstring, :short-name, and :long-name properties.
80 'ascii
:docstring
"ASCII (ISO646 IRV)")
82 'ascii
:short-name
"ASCII")
84 'ascii
:long-name
"ASCII (ISO646 IRV)")
86 'iso-8859-1
:docstring
"Latin-1 (ISO/IEC 8859-1)")
88 'iso-8859-1
:short-name
"Latin-1")
90 'iso-8859-1
:long-name
"Latin-1")
92 'unicode
:docstring
"Unicode (ISO10646)")
94 'unicode
:short-name
"Unicode")
96 'unicode
:long-name
"Unicode (ISO10646)")
97 (put-charset-property 'eight-bit
:docstring
"Raw bytes 0-255")
98 (put-charset-property 'eight-bit
:short-name
"Raw bytes")
100 (define-charset-alias 'ucs
'unicode
)
102 (define-charset 'emacs
103 "Full Emacs characters"
104 :ascii-compatible-p t
105 :code-space
[ 0 255 0 255 0 63 ]
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"
118 ;; Name perhaps not ideal, but is XEmacs-compatible.
119 (define-charset 'control-1
120 "8-bit control code (0x80..0x9F)"
121 :short-name
"8-bit control code"
122 :code-space
[128 159]
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"
129 :code-space
[128 159]
130 :code-offset
#x3FFF80
) ; see character.h
132 (define-charset 'eight-bit-graphic
133 "Raw bytes in the range 0xA0..0xFF (usually produced from invalid encodings)"
134 :short-name
"Raw bytes 0xA0..0xFF"
136 :code-space
[160 255]
137 :code-offset
#x3FFFA0
) ; see character.h
139 (defmacro define-iso-single-byte-charset
(symbol iso-symbol name nickname
143 (define-charset ,symbol
145 :short-name
,nickname
147 :ascii-compatible-p t
151 (define-charset ,iso-symbol
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
159 :emacs-mule-id
,emacs-mule-id
161 :subset
(list ,symbol
160 255 -
128)))))
163 (define-iso-single-byte-charset 'iso-8859-2
'latin-iso8859-2
164 "ISO/IEC 8859/2" "Latin-2" 101 ?B
130 "8859-2")
166 (define-iso-single-byte-charset 'iso-8859-3
'latin-iso8859-3
167 "ISO/IEC 8859/3" "Latin-3" 109 ?C
131 "8859-3")
169 (define-iso-single-byte-charset 'iso-8859-4
'latin-iso8859-4
170 "ISO/IEC 8859/4" "Latin-4" 110 ?D
132 "8859-4")
172 (define-iso-single-byte-charset 'iso-8859-5
'cyrillic-iso8859-5
173 "ISO/IEC 8859/5" "Latin/Cyrillic" 144 ?L
140 "8859-5")
175 (define-iso-single-byte-charset 'iso-8859-6
'arabic-iso8859-6
176 "ISO/IEC 8859/6" "Latin/Arabic" 127 ?G
135 "8859-6")
178 (define-iso-single-byte-charset 'iso-8859-7
'greek-iso8859-7
179 "ISO/IEC 8859/7" "Latin/Greek" 126 ?F
134 "8859-7")
181 (define-iso-single-byte-charset 'iso-8859-8
'hebrew-iso8859-8
182 "ISO/IEC 8859/8" "Latin/Hebrew" 138 ?H
136 "8859-8")
184 (define-iso-single-byte-charset 'iso-8859-9
'latin-iso8859-9
185 "ISO/IEC 8859/9" "Latin-5" 148 ?M
141 "8859-9")
187 (define-iso-single-byte-charset 'iso-8859-10
'latin-iso8859-10
188 "ISO/IEC 8859/10" "Latin-6" 157 ?V nil
"8859-10")
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
193 (define-iso-single-byte-charset 'iso-8859-11
'thai-iso8859-11
194 "ISO/IEC 8859/11" "Latin/Thai" 166 ?T nil
"8859-11")
196 ;; 8859-12 doesn't (yet?) exist.
198 (define-iso-single-byte-charset 'iso-8859-13
'latin-iso8859-13
199 "ISO/IEC 8859/13" "Latin-7" 179 ?Y nil
"8859-13")
201 (define-iso-single-byte-charset 'iso-8859-14
'latin-iso8859-14
202 "ISO/IEC 8859/14" "Latin-8" 199 ?_
143 "8859-14")
204 (define-iso-single-byte-charset 'iso-8859-15
'latin-iso8859-15
205 "ISO/IEC 8859/15" "Latin-9" 203 ?b
142 "8859-15")
207 (define-iso-single-byte-charset 'iso-8859-16
'latin-iso8859-16
208 "ISO/IEC 8859/16" "Latin-10" 226 ?f nil
"8859-16")
210 ;; No point in keeping it around.
211 (fmakunbound 'define-iso-single-byte-charset
)
213 ;; Can this be shared with 8859-11?
214 ;; N.b. not all of these are defined unicodes.
215 (define-charset 'thai-tis620
217 :short-name
"TIS620.2533"
223 ;; Fixme: doc for this, c.f. above
224 (define-charset 'tis620-2533
226 :short-name
"TIS620.2533"
227 :ascii-compatible-p t
229 :superset
'(ascii eight-bit-control
(thai-tis620 .
128)))
231 (define-charset 'jisx0201
233 :short-name
"JISX0201"
237 (define-charset 'latin-jisx0201
238 "Roman Part of JISX0201.1976"
239 :short-name
"JISX0201 Roman"
240 :long-name
"Japanese Roman (JISX0201.1976)"
245 :subset
'(jisx0201 33 126 0))
247 (define-charset 'katakana-jisx0201
248 "Katakana Part of JISX0201.1976"
249 :short-name
"JISX0201 Katakana"
250 :long-name
"Japanese Katakana (JISX0201.1976)"
255 :subset
'(jisx0201 161 254 -
128))
257 (define-charset 'chinese-gb2312
258 "GB2312 Chinese simplified: ISO-IR-58"
260 :long-name
"GB2312: ISO-IR-58"
263 :code-space
[33 126 33 126]
264 :code-offset
#x110000
267 (define-charset 'chinese-gbk
268 "GBK Chinese simplified."
270 :code-space
[#x40
#xFE
#x81
#xFE
]
271 :code-offset
#x160000
273 (define-charset-alias 'cp936
'chinese-gbk
)
274 (define-charset-alias 'windows-936
'chinese-gbk
)
276 (define-charset 'chinese-cns11643-1
277 "CNS11643 Plane 1 Chinese traditional: ISO-IR-171"
278 :short-name
"CNS11643-1"
279 :long-name
"CNS11643-1 (Chinese traditional): ISO-IR-171"
282 :code-space
[33 126 33 126]
283 :code-offset
#x114000
286 (define-charset 'chinese-cns11643-2
287 "CNS11643 Plane 2 Chinese traditional: ISO-IR-172"
288 :short-name
"CNS11643-2"
289 :long-name
"CNS11643-2 (Chinese traditional): ISO-IR-172"
292 :code-space
[33 126 33 126]
293 :code-offset
#x118000
296 (define-charset 'chinese-cns11643-3
297 "CNS11643 Plane 3 Chinese Traditional: ISO-IR-183"
298 :short-name
"CNS11643-3"
299 :long-name
"CNS11643-3 (Chinese traditional): ISO-IR-183"
301 :code-space
[33 126 33 126]
303 :code-offset
#x11C000
306 (define-charset 'chinese-cns11643-4
307 "CNS11643 Plane 4 Chinese Traditional: ISO-IR-184"
308 :short-name
"CNS11643-4"
309 :long-name
"CNS11643-4 (Chinese traditional): ISO-IR-184"
312 :code-space
[33 126 33 126]
313 :code-offset
#x120000
316 (define-charset 'chinese-cns11643-5
317 "CNS11643 Plane 5 Chinese Traditional: ISO-IR-185"
318 :short-name
"CNS11643-5"
319 :long-name
"CNS11643-5 (Chinese traditional): ISO-IR-185"
322 :code-space
[33 126 33 126]
323 :code-offset
#x124000
326 (define-charset 'chinese-cns11643-6
327 "CNS11643 Plane 6 Chinese Traditional: ISO-IR-186"
328 :short-name
"CNS11643-6"
329 :long-name
"CNS11643-6 (Chinese traditional): ISO-IR-186"
332 :code-space
[33 126 33 126]
333 :code-offset
#x128000
336 (define-charset 'chinese-cns11643-7
337 "CNS11643 Plane 7 Chinese Traditional: ISO-IR-187"
338 :short-name
"CNS11643-7"
339 :long-name
"CNS11643-7 (Chinese traditional): ISO-IR-187"
342 :code-space
[33 126 33 126]
343 :code-offset
#x12C000
346 (define-charset 'big5
347 "Big5 (Chinese traditional)"
349 :code-space
[#x40
#xFE
#xA1
#xFE
]
350 :code-offset
#x130000
352 ;; Fixme: AKA cp950 according to
353 ;; <URL:http://www.microsoft.com/globaldev/reference/WinCP.asp>. Is
356 (define-charset 'chinese-big5-1
357 "Frequently used part (A141-C67E) of Big5 (Chinese traditional)"
358 :short-name
"Big5 (Level-1)"
359 :long-name
"Big5 (Level-1) A141-C67F"
363 :code-space
[#x21
#x7E
#x21
#x7E
]
364 :code-offset
#x135000
367 (define-charset 'chinese-big5-2
368 "Less frequently used part (C940-FEFE) of Big5 (Chinese traditional)"
369 :short-name
"Big5 (Level-2)"
370 :long-name
"Big5 (Level-2) C940-FEFE"
374 :code-space
[#x21
#x7E
#x21
#x7E
]
375 :code-offset
#x137800
378 (define-charset 'japanese-jisx0208
379 "JISX0208.1983/1990 Japanese Kanji: ISO-IR-87"
380 :short-name
"JISX0208"
381 :long-name
"JISX0208.1983/1990 (Japanese): ISO-IR-87"
384 :code-space
[33 126 33 126]
385 :code-offset
#x140000
386 :unify-map
"JISX0208")
388 (define-charset 'japanese-jisx0208-1978
389 "JISX0208.1978 Japanese Kanji (so called \"old JIS\"): ISO-IR-42"
390 :short-name
"JISX0208.1978"
391 :long-name
"JISX0208.1978 (JISC6226.1978): ISO-IR-42"
394 :code-space
[33 126 33 126]
395 :code-offset
#x144000
396 :unify-map
"JISC6226")
398 (define-charset 'japanese-jisx0212
399 "JISX0212 Japanese supplement: ISO-IR-159"
400 :short-name
"JISX0212"
401 :long-name
"JISX0212 (Japanese): ISO-IR-159"
404 :code-space
[33 126 33 126]
405 :code-offset
#x148000
406 :unify-map
"JISX0212")
408 ;; Note that jisx0213 contains characters not in Unicode (3.2?). It's
409 ;; arguable whether it should have a unify-map.
410 (define-charset 'japanese-jisx0213-1
411 "JISX0213.2000 Plane 1 (Japanese)"
412 :short-name
"JISX0213-1"
415 :unify-map
"JISX2131"
416 :code-space
[33 126 33 126]
417 :code-offset
#x14C000
)
419 (define-charset 'japanese-jisx0213-2
420 "JISX0213.2000 Plane 2 (Japanese)"
421 :short-name
"JISX0213-2"
424 :unify-map
"JISX2132"
425 :code-space
[33 126 33 126]
426 :code-offset
#x150000
)
428 (define-charset 'japanese-jisx0213-a
429 "JISX0213.2004 adds these characters to JISX0213.2000."
430 :short-name
"JISX0213A"
432 :code-space
[33 126 33 126]
436 (define-charset 'japanese-jisx0213.2004-
1
437 "JISX0213.2004 Plane1 (Japanese)"
438 :short-name
"JISX0213.2004-1"
440 :code-space
[33 126 33 126]
442 :superset
'(japanese-jisx0213-a japanese-jisx0213-1
))
444 (define-charset 'katakana-sjis
445 "Katakana part of Shift-JIS"
447 :code-space
[#xA1
#xDF
]
448 :subset
'(jisx0201 #xA1
#xDF
0)
451 (define-charset 'cp932-2-byte
452 "2-byte part of CP932"
455 :code-space
[#x40
#xFC
#x81
#xFC
]
458 (define-charset 'cp932
459 "CP932 (Microsoft shift-jis)"
460 :code-space
[#x00
#xFF
#x00
#xFE
]
462 :superset
'(ascii katakana-sjis cp932-2-byte
))
464 (define-charset 'korean-ksc5601
465 "KSC5601 Korean Hangul and Hanja: ISO-IR-149"
466 :short-name
"KSC5601"
467 :long-name
"KSC5601 (Korean): ISO-IR-149"
470 :code-space
[33 126 33 126]
471 :code-offset
#x279f94
; ... #x27c217
472 :unify-map
"KSC5601")
474 (define-charset 'big5-hkscs
475 "Big5-HKSCS (Chinese traditional, Hong Kong supplement)"
477 :code-space
[#x40
#xFE
#xA1
#xFE
]
478 :code-offset
#x27c218
; ... #x280839
479 :unify-map
"BIG5-HKSCS")
481 ;; Fixme: Korean cp949/UHC
483 (define-charset 'chinese-sisheng
484 "SiSheng characters for PinYin/ZhuYin"
485 :short-name
"SiSheng"
486 :long-name
"SiSheng (PinYin/ZhuYin)"
490 :unify-map
"MULE-sisheng"
492 :code-offset
#x200000
)
494 ;; A subset of the 1989 version of IPA. It consists of the consonant
495 ;; signs used in English, French, German and Italian, and all vowels
496 ;; signs in the table. [says old MULE doc]
498 "IPA (International Phonetic Association)"
502 :unify-map
"MULE-ipa"
505 :code-offset
#x200080
)
507 (define-charset 'viscii
510 :long-name
"VISCII 1.1"
514 (define-charset 'vietnamese-viscii-lower
515 "VISCII1.1 lower-case"
516 :short-name
"VISCII lower"
517 :long-name
"VISCII lower-case"
521 :code-offset
#x200200
523 :unify-map
"MULE-lviscii")
525 (define-charset 'vietnamese-viscii-upper
526 "VISCII1.1 upper-case"
527 :short-name
"VISCII upper"
528 :long-name
"VISCII upper-case"
532 :code-offset
#x200280
534 :unify-map
"MULE-uviscii")
536 (define-charset 'vscii
537 "VSCII1.1 (TCVN-5712 VN1)"
542 (define-charset-alias 'tcvn-5712
'vscii
)
544 ;; Fixme: see note in tcvn.map about combining characters
545 (define-charset 'vscii-2
546 "VSCII-2 (TCVN-5712 VN2)"
550 (define-charset 'koi8-r
553 :ascii-compatible-p t
557 (define-charset-alias 'koi8
'koi8-r
)
559 (define-charset 'alternativnyj
561 :short-name
"alternativnyj"
562 :ascii-compatible-p t
564 :map
"ALTERNATIVNYJ")
566 (define-charset 'cp866
569 :ascii-compatible-p t
572 (define-charset-alias 'ibm866
'cp866
)
574 (define-charset 'koi8-u
577 :ascii-compatible-p t
581 (define-charset 'koi8-t
584 :ascii-compatible-p t
588 (define-charset 'georgian-ps
590 :short-name
"GEORGIAN-PS"
591 :ascii-compatible-p t
595 (define-charset 'georgian-academy
597 :short-name
"GEORGIAN-ACADEMY"
598 :ascii-compatible-p t
602 (define-charset 'windows-1250
603 "WINDOWS-1250 (Central Europe)"
604 :short-name
"WINDOWS-1250"
605 :ascii-compatible-p t
608 (define-charset-alias 'cp1250
'windows-1250
)
610 (define-charset 'windows-1251
611 "WINDOWS-1251 (Cyrillic)"
612 :short-name
"WINDOWS-1251"
613 :ascii-compatible-p t
616 (define-charset-alias 'cp1251
'windows-1251
)
618 (define-charset 'windows-1252
619 "WINDOWS-1252 (Latin I)"
620 :short-name
"WINDOWS-1252"
621 :ascii-compatible-p t
624 (define-charset-alias 'cp1252
'windows-1252
)
626 (define-charset 'windows-1253
627 "WINDOWS-1253 (Greek)"
628 :short-name
"WINDOWS-1253"
629 :ascii-compatible-p t
632 (define-charset-alias 'cp1253
'windows-1253
)
634 (define-charset 'windows-1254
635 "WINDOWS-1254 (Turkish)"
636 :short-name
"WINDOWS-1254"
637 :ascii-compatible-p t
640 (define-charset-alias 'cp1254
'windows-1254
)
642 (define-charset 'windows-1255
643 "WINDOWS-1255 (Hebrew)"
644 :short-name
"WINDOWS-1255"
645 :ascii-compatible-p t
648 (define-charset-alias 'cp1255
'windows-1255
)
650 (define-charset 'windows-1256
651 "WINDOWS-1256 (Arabic)"
652 :short-name
"WINDOWS-1256"
653 :ascii-compatible-p t
656 (define-charset-alias 'cp1256
'windows-1256
)
658 (define-charset 'windows-1257
659 "WINDOWS-1257 (Baltic)"
660 :short-name
"WINDOWS-1257"
661 :ascii-compatible-p t
664 (define-charset-alias 'cp1257
'windows-1257
)
666 (define-charset 'windows-1258
667 "WINDOWS-1258 (Viet Nam)"
668 :short-name
"WINDOWS-1258"
669 :ascii-compatible-p t
672 (define-charset-alias 'cp1258
'windows-1258
)
674 (define-charset 'next
677 :ascii-compatible-p t
681 (define-charset 'cp1125
685 :ascii-compatible-p t
687 (define-charset-alias 'ruscii
'cp1125
)
688 ;; Original name for cp1125, says Serhii Hlodin <hlodin@lutsk.bank.gov.ua>
689 (define-charset-alias 'cp866u
'cp1125
)
691 ;; Fixme: C.f. iconv, http://czyborra.com/charsets/codepages.html
692 ;; shows this as not ASCII comptaible, with various graphics in
694 (define-charset 'cp437
695 "CP437 (MS-DOS United States, Australia, New Zealand, South Africa)"
698 :ascii-compatible-p t
701 (define-charset 'cp720
705 :ascii-compatible-p t
708 (define-charset 'cp737
712 :ascii-compatible-p t
715 (define-charset 'cp775
719 :ascii-compatible-p t
722 (define-charset 'cp851
726 :ascii-compatible-p t
729 (define-charset 'cp852
730 "CP852 (MS-DOS Latin-2)"
733 :ascii-compatible-p t
736 (define-charset 'cp855
737 "CP855 (IBM Cyrillic)"
740 :ascii-compatible-p t
743 (define-charset 'cp857
744 "CP857 (IBM Turkish)"
747 :ascii-compatible-p t
750 (define-charset 'cp858
751 "CP858 (Multilingual Latin I + Euro)"
754 :ascii-compatible-p t
756 (define-charset-alias 'cp00858
'cp858
) ; IANA has IBM00858/CP00858
758 (define-charset 'cp860
759 "CP860 (MS-DOS Portuguese)"
762 :ascii-compatible-p t
765 (define-charset 'cp861
766 "CP861 (MS-DOS Icelandic)"
769 :ascii-compatible-p t
772 (define-charset 'cp862
776 :ascii-compatible-p t
779 (define-charset 'cp863
780 "CP863 (MS-DOS Canadian French)"
783 :ascii-compatible-p t
786 (define-charset 'cp864
790 :ascii-compatible-p t
793 (define-charset 'cp865
794 "CP865 (MS-DOS Nordic)"
797 :ascii-compatible-p t
800 (define-charset 'cp869
801 "CP869 (IBM Modern Greek)"
804 :ascii-compatible-p t
807 (define-charset 'cp874
811 :ascii-compatible-p t
814 ;; For Arabic, we need three different types of character sets.
815 ;; Digits are of direction left-to-right and of width 1-column.
816 ;; Others are of direction right-to-left and of width 1-column or
818 (define-charset 'arabic-digit
820 :short-name
"Arabic digit"
827 (define-charset 'arabic-1-column
829 :short-name
"Arabic 1-col"
830 :long-name
"Arabic 1-column"
835 :code-offset
#x200100
)
837 (define-charset 'arabic-2-column
839 :short-name
"Arabic 2-col"
840 :long-name
"Arabic 2-column"
845 :code-offset
#x200180
)
848 ;; Codes 0x21..0x7E are mapped to Unicode U+0E81..U+0EDF.
849 ;; Not all of them are defined unicodes.
851 "Lao characters (ISO10646 0E81..0EDF)"
859 (define-charset 'mule-lao
860 "Lao characters (ISO10646 0E81..0EDF)"
864 :superset
'(ascii eight-bit-control
(lao .
128)))
867 ;; Indian scripts. Symbolic charset for data exchange. Glyphs are
868 ;; not assigned. They are automatically converted to each Indian
869 ;; script which IS-13194 supports.
871 (define-charset 'indian-is13194
872 "Generic Indian charset for data exchange with IS 13194"
873 :short-name
"IS 13194"
874 :long-name
"Indian IS 13194"
879 :code-offset
#x180000
)
881 (let ((code-offset #x180100
))
882 (dolist (script '(devanagari sanskrit bengali tamil telugu assamese
883 oriya kannada malayalam gujarati punjabi
))
884 (define-charset (intern (format "%s-cdac" script
))
885 (format "Glyphs of %s script for CDAC font. Subset of `indian-glyph'."
886 (capitalize (symbol-name script
)))
887 :short-name
(format "CDAC %s glyphs" (capitalize (symbol-name script
)))
890 :code-offset code-offset
)
891 (setq code-offset
(+ code-offset
#x100
)))
893 (dolist (script '(devanagari bengali punjabi gujarati
894 oriya tamil telugu kannada malayalam
))
895 (define-charset (intern (format "%s-akruti" script
))
896 (format "Glyphs of %s script for AKRUTI font. Subset of `indian-glyph'."
897 (capitalize (symbol-name script
)))
898 :short-name
(format "AKRUTI %s glyphs" (capitalize (symbol-name script
)))
901 :code-offset code-offset
)
902 (setq code-offset
(+ code-offset
#x100
))))
904 (define-charset 'indian-glyph
905 "Glyphs for Indian characters."
906 :short-name
"Indian glyph"
910 :code-space
[32 127 32 127]
911 :code-offset
#x180100
)
913 ;; Actual Glyph for 1-column width.
914 (define-charset 'indian-1-column
915 "Indian charset for 1-column width glyphs."
916 :short-name
"Indian 1-col"
917 :long-name
"Indian 1 Column"
921 :code-space
[33 126 33 126]
922 :code-offset
#x184000
)
924 ;; Actual Glyph for 2-column width.
925 (define-charset 'indian-2-column
926 "Indian charset for 2-column width glyphs."
927 :short-name
"Indian 2-col"
928 :long-name
"Indian 2 Column"
932 :code-space
[33 126 33 126]
933 :code-offset
#x184000
)
935 (define-charset 'tibetan
938 :short-name
"Tibetan 2-col"
939 :long-name
"Tibetan 2 column"
942 :unify-map
"MULE-tibetan"
944 :code-space
[33 126 33 37]
945 :code-offset
#x190000
)
947 (define-charset 'tibetan-1-column
948 "Tibetan 1 column glyph"
949 :short-name
"Tibetan 1-col"
950 :long-name
"Tibetan 1 column"
954 :code-space
[33 126 33 37]
955 :code-offset
#x190000
)
957 ;; Subsets of Unicode.
958 (define-charset 'mule-unicode-2500-33ff
959 "Unicode characters of the range U+2500..U+33FF."
960 :short-name
"Unicode subset 2"
961 :long-name
"Unicode subset (U+2500..U+33FF)"
965 :code-space
[#x20
#x7f
#x20
#x47
]
968 (define-charset 'mule-unicode-e000-ffff
969 "Unicode characters of the range U+E000..U+FFFF."
970 :short-name
"Unicode subset 3"
971 :long-name
"Unicode subset (U+E000+FFFF)"
975 :code-space
[#x20
#x7F
#x20
#x75
]
977 :max-code
30015) ; U+FFFF
979 (define-charset 'mule-unicode-0100-24ff
980 "Unicode characters of the range U+0100..U+24FF."
981 :short-name
"Unicode subset"
982 :long-name
"Unicode subset (U+0100..U+24FF)"
986 :code-space
[#x20
#x7F
#x20
#x7F
]
989 (define-charset 'unicode-bmp
990 "Unicode Basic Multilingual Plane (U+0000..U+FFFF)"
991 :short-name
"Unicode BMP"
992 :code-space
[0 255 0 255]
995 (define-charset 'unicode-smp
996 "Unicode Supplementary Multilingual Plane (U+10000..U+1FFFF)"
997 :short-name
"Unicode SMP "
998 :code-space
[0 255 0 255]
999 :code-offset
#x10000
)
1001 (define-charset 'unicode-sip
1002 "Unicode Supplementary Ideographic Plane (U+20000..U+2FFFF)"
1003 :short-name
"Unicode SIP"
1004 :code-space
[0 255 0 255]
1005 :code-offset
#x20000
)
1007 (define-charset 'unicode-ssp
1008 "Unicode Supplementary Special-purpose Plane (U+E0000..U+EFFFF)"
1009 :short-name
"Unicode SSP"
1010 :code-space
[0 255 0 255]
1011 :code-offset
#xE0000
)
1013 (define-charset 'ethiopic
1014 "Ethiopic characters for Amharic and Tigrigna."
1015 :short-name
"Ethiopic"
1016 :long-name
"Ethiopic characters"
1020 :unify-map
"MULE-ethiopic"
1021 :code-space
[33 126 33 126]
1022 :code-offset
#x1A0000
)
1024 (define-charset 'mac-roman
1026 :short-name
"Mac Roman"
1027 :ascii-compatible-p t
1031 ;; Fixme: modern EBCDIC variants, e.g. IBM00924?
1032 (define-charset 'ebcdic-us
1033 "US version of EBCDIC"
1034 :short-name
"EBCDIC-US"
1036 :mime-charset
'ebcdic-us
1039 (define-charset 'ebcdic-uk
1040 "UK version of EBCDIC"
1041 :short-name
"EBCDIC-UK"
1043 :mime-charset
'ebcdic-uk
1046 (define-charset 'ibm1047
1048 "IBM1047, `EBCDIC Latin 1/Open Systems' used by OS/390 Unix."
1049 :short-name
"IBM1047"
1051 :mime-charset
'ibm1047
1053 (define-charset-alias 'cp1047
'ibm1047
)
1055 (define-charset 'hp-roman8
1056 "Encoding used by Hewlet-Packard printer software"
1057 :short-name
"HP-ROMAN8"
1058 :ascii-compatible-p t
1062 ;; To make a coding system with this, a pre-write-conversion should
1063 ;; account for the commented-out multi-valued code points in
1065 (define-charset 'adobe-standard-encoding
1066 "Adobe `standard encoding' used in PostScript"
1067 :short-name
"ADOBE-STANDARD-ENCODING"
1068 :code-space
[#x20
255]
1071 (define-charset 'symbol
1072 "Adobe symbol encoding used in PostScript"
1073 :short-name
"ADOBE-SYMBOL"
1074 :code-space
[#x20
255]
1077 (define-charset 'ibm850
1078 "DOS codepage 850 (Latin-1)"
1079 :short-name
"IBM850"
1080 :ascii-compatible-p t
1083 (define-charset-alias 'cp850
'ibm850
)
1085 (define-charset 'mik
1086 "Bulgarian DOS codepage"
1088 :ascii-compatible-p t
1092 (define-charset 'ptcp154
1093 "`Paratype' codepage (Asian Cyrillic)"
1095 :ascii-compatible-p t
1097 :mime-charset
'pt154
1099 (define-charset-alias 'pt154
'ptcp154
)
1100 (define-charset-alias 'cp154
'ptcp154
)
1102 (define-charset 'gb18030-2-byte
1103 "GB18030 2-byte (0x814E..0xFEFE)"
1104 :code-space
[#x40
#xFE
#x81
#xFE
]
1108 (define-charset 'gb18030-4-byte-bmp
1109 "GB18030 4-byte for BMP (0x81308130-0x8431A439)"
1110 :code-space
[#x30
#x39
#x81
#xFE
#x30
#x39
#x81
#x84
]
1114 (define-charset 'gb18030-4-byte-smp
1115 "GB18030 4-byte for SMP (0x90308130-0xE3329A35)"
1116 :code-space
[#x30
#x39
#x81
#xFE
#x30
#x39
#x90
#xE3
]
1117 :min-code
'(#x9030 .
#x8130
)
1118 :max-code
'(#xE332 .
#x9A35
)
1120 :code-offset
#x10000
)
1122 (define-charset 'gb18030-4-byte-ext-1
1123 "GB18030 4-byte (0x8431A530-0x8F39FE39)"
1124 :code-space
[#x30
#x39
#x81
#xFE
#x30
#x39
#x84
#x8F
]
1125 :min-code
'(#x8431 .
#xA530
)
1126 :max-code
'(#x8F39 .
#xFE39
)
1128 :code-offset
#x200000
; ... #x22484B
1131 (define-charset 'gb18030-4-byte-ext-2
1132 "GB18030 4-byte (0xE3329A36-0xFE39FE39)"
1133 :code-space
[#x30
#x39
#x81
#xFE
#x30
#x39
#xE3
#xFE
]
1134 :min-code
'(#xE332 .
#x9A36
)
1135 :max-code
'(#xFE39 .
#xFE39
)
1137 :code-offset
#x22484C
; ... #x279f93
1140 (define-charset 'gb18030
1142 :code-space
[#x00
#xFF
#x00
#xFE
#x00
#xFE
#x00
#xFE
]
1144 :max-code
'(#xFE39 .
#xFE39
)
1145 :superset
'(ascii gb18030-2-byte
1146 gb18030-4-byte-bmp gb18030-4-byte-smp
1147 gb18030-4-byte-ext-1 gb18030-4-byte-ext-2
))
1149 (define-charset 'chinese-cns11643-15
1150 "CNS11643 Plane 15 Chinese Traditional"
1151 :short-name
"CNS11643-15"
1152 :long-name
"CNS11643-15 (Chinese traditional)"
1153 :code-space
[33 126 33 126]
1154 :code-offset
#x27A000
)
1156 (unify-charset 'chinese-gb2312
)
1157 (unify-charset 'chinese-gbk
)
1158 (unify-charset 'chinese-cns11643-1
)
1159 (unify-charset 'chinese-cns11643-2
)
1160 (unify-charset 'chinese-cns11643-3
)
1161 (unify-charset 'chinese-cns11643-4
)
1162 (unify-charset 'chinese-cns11643-5
)
1163 (unify-charset 'chinese-cns11643-6
)
1164 (unify-charset 'chinese-cns11643-7
)
1165 (unify-charset 'big5
)
1166 (unify-charset 'chinese-big5-1
)
1167 (unify-charset 'chinese-big5-2
)
1168 (unify-charset 'big5-hkscs
)
1169 (unify-charset 'korean-ksc5601
)
1170 (unify-charset 'vietnamese-viscii-lower
)
1171 (unify-charset 'vietnamese-viscii-upper
)
1172 (unify-charset 'chinese-sisheng
)
1173 (unify-charset 'ipa
)
1174 (unify-charset 'tibetan
)
1175 (unify-charset 'ethiopic
)
1176 (unify-charset 'japanese-jisx0208-1978
)
1177 (unify-charset 'japanese-jisx0208
)
1178 (unify-charset 'japanese-jisx0212
)
1179 (unify-charset 'japanese-jisx0213-1
)
1180 (unify-charset 'japanese-jisx0213-2
)
1183 ;; These are tables for translating characters on decoding and
1185 ;; Fixme: these aren't used now -- should they be?
1186 (setq standard-translation-table-for-decode nil
)
1188 (setq standard-translation-table-for-encode nil
)
1190 ;;; Make fundamental coding systems.
1192 ;; The coding system `no-conversion' and `undecided' are already
1193 ;; defined in coding.c as below:
1195 ;; (define-coding-system 'no-conversion
1197 ;; :coding-type 'raw-text
1199 ;; (define-coding-system 'undecided
1201 ;; :coding-type 'undecided
1204 (define-coding-system-alias 'binary
'no-conversion
)
1205 (define-coding-system-alias 'unix
'undecided-unix
)
1206 (define-coding-system-alias 'dos
'undecided-dos
)
1207 (define-coding-system-alias 'mac
'undecided-mac
)
1209 (define-coding-system 'raw-text
1210 "Raw text, which means text contains random 8-bit codes.
1211 Encoding text with this coding system produces the actual byte
1212 sequence of the text in buffers and strings. An exception is made for
1213 eight-bit-control characters. Each of them is encoded into a single
1216 When you visit a file with this coding, the file is read into a
1217 unibyte buffer as is (except for EOL format), thus each byte of a file
1218 is treated as a character."
1219 :coding-type
'raw-text
1223 (define-coding-system 'no-conversion-multibyte
1224 "Like `no-conversion' but don't read a file into a unibyte buffer."
1225 :coding-type
'raw-text
1229 (define-coding-system 'iso-latin-1
1230 "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)."
1231 :coding-type
'charset
1233 :charset-list
'(iso-8859-1)
1234 :mime-charset
'iso-8859-1
)
1236 (define-coding-system-alias 'iso-8859-1
'iso-latin-1
)
1237 (define-coding-system-alias 'latin-1
'iso-latin-1
)
1239 ;; Coding systems not specific to each language environment.
1241 (define-coding-system 'emacs-mule
1242 "Emacs 21 internal format used in buffer and string."
1243 :coding-type
'emacs-mule
1244 :charset-list
'emacs-mule
1247 (define-coding-system 'utf-8
1251 :charset-list
'(unicode)
1252 :mime-charset
'utf-8
)
1254 (define-coding-system-alias 'mule-utf-8
'utf-8
)
1256 (define-coding-system 'utf-8-emacs
1257 "Support for all Emacs characters (including non-Unicode characters)."
1260 :charset-list
'(emacs))
1262 (define-coding-system 'utf-16le
1263 "UTF-16LE (little endian, no signature (BOM))."
1264 :coding-type
'utf-16
1266 :charset-list
'(unicode)
1268 :mime-text-unsuitable t
1269 :mime-charset
'utf-16le
)
1271 (define-coding-system 'utf-16be
1272 "UTF-16BE (big endian, no signature (BOM))."
1273 :coding-type
'utf-16
1275 :charset-list
'(unicode)
1277 :mime-text-unsuitable t
1278 :mime-charset
'utf-16be
)
1280 (define-coding-system 'utf-16le-with-signature
1281 "UTF-16 (little endian, with signature (BOM))."
1282 :coding-type
'utf-16
1284 :charset-list
'(unicode)
1287 :mime-text-unsuitable t
1288 :mime-charset
'utf-16
)
1290 (define-coding-system 'utf-16be-with-signature
1291 "UTF-16 (big endian, with signature)."
1292 :coding-type
'utf-16
1294 :charset-list
'(unicode)
1297 :mime-text-unsuitable t
1298 :mime-charset
'utf-16
)
1300 (define-coding-system 'utf-16
1301 "UTF-16 (detect endian on decoding, use big endian on encoding with BOM)."
1302 :coding-type
'utf-16
1304 :charset-list
'(unicode)
1305 :bom
'(utf-16le-with-signature . utf-16be-with-signature
)
1307 :mime-text-unsuitable t
1308 :mime-charset
'utf-16
)
1310 ;; Backwards compatibility (old names, also used by Mule-UCS). We
1311 ;; prefer the MIME names.
1312 (define-coding-system-alias 'utf-16-le
'utf-16le-with-signature
)
1313 (define-coding-system-alias 'utf-16-be
'utf-16be-with-signature
)
1316 (define-coding-system 'iso-2022-7bit
1317 "ISO 2022 based 7-bit encoding using only G0."
1318 :coding-type
'iso-2022
1320 :charset-list
'iso-2022
1321 :designation
[(ascii t
) nil nil nil
]
1322 :flags
'(short ascii-at-eol ascii-at-cntl
7-bit designation composition
))
1324 (define-coding-system 'iso-2022-7bit-ss2
1325 "ISO 2022 based 7-bit encoding using SS2 for 96-charset."
1326 :coding-type
'iso-2022
1328 :charset-list
'iso-2022
1329 :designation
[(ascii 94) nil
(nil 96) nil
]
1330 :flags
'(short ascii-at-eol ascii-at-cntl
7-bit
1331 designation single-shift composition
))
1333 (define-coding-system 'iso-2022-7bit-lock
1334 "ISO-2022 coding system using Locking-Shift for 96-charset."
1335 :coding-type
'iso-2022
1337 :charset-list
'iso-2022
1338 :designation
[(ascii 94) (nil 96) nil nil
]
1339 :flags
'(ascii-at-eol ascii-at-cntl
7-bit
1340 designation locking-shift composition
))
1342 (define-coding-system-alias 'iso-2022-int-1
'iso-2022-7bit-lock
)
1344 (define-coding-system 'iso-2022-7bit-lock-ss2
1345 "Mixture of ISO-2022-JP, ISO-2022-KR, and ISO-2022-CN."
1346 :coding-type
'iso-2022
1348 :charset-list
'(ascii
1349 japanese-jisx0208 japanese-jisx0208-1978 latin-jisx0201
1352 chinese-cns11643-1 chinese-cns11643-2 chinese-cns11643-3
1353 chinese-cns11643-4 chinese-cns11643-5 chinese-cns11643-6
1355 :designation
[(ascii 94)
1356 (nil korean-ksc5601 chinese-gb2312 chinese-cns11643-1
96)
1357 (nil chinese-cns11643-2
)
1358 (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
1359 chinese-cns11643-6 chinese-cns11643-7
)]
1360 :flags
'(short ascii-at-eol ascii-at-cntl
7-bit locking-shift
1361 single-shift init-bol
))
1363 (define-coding-system-alias 'iso-2022-cjk
'iso-2022-7bit-lock-ss2
)
1365 (define-coding-system 'iso-2022-8bit-ss2
1366 "ISO 2022 based 8-bit encoding using SS2 for 96-charset."
1367 :coding-type
'iso-2022
1369 :charset-list
'iso-2022
1370 :designation
[(ascii 94) nil
(nil 96) nil
]
1371 :flags
'(ascii-at-eol ascii-at-cntl designation single-shift composition
))
1373 (define-coding-system 'compound-text
1374 "Compound text based generic encoding for decoding unknown messages.
1376 This coding system does not support extended segments of CTEXT."
1377 :coding-type
'iso-2022
1379 :charset-list
'iso-2022
1380 :designation
[(ascii 94) (latin-iso8859-1 katakana-jisx0201
96) nil nil
]
1381 :flags
'(ascii-at-eol ascii-at-cntl long-form
1382 designation locking-shift single-shift composition
)
1383 ;; Fixme: this isn't a valid MIME charset and has to be
1384 ;; special-cased elsewhere -- fx
1385 :mime-charset
'x-ctext
)
1387 (define-coding-system-alias 'x-ctext
'compound-text
)
1388 (define-coding-system-alias 'ctext
'compound-text
)
1390 ;; Same as compound-text, but doesn't produce composition escape
1391 ;; sequences. Used in post-read and pre-write conversions of
1392 ;; compound-text-with-extensions, see mule.el. Note that this should
1393 ;; not have a mime-charset property, to prevent it from showing up
1394 ;; close to the beginning of coding systems ordered by priority.
1395 (define-coding-system 'ctext-no-compositions
1396 "Compound text based generic encoding for decoding unknown messages.
1398 Like `compound-text', but does not produce escape sequences for compositions."
1399 :coding-type
'iso-2022
1401 :charset-list
'iso-2022
1402 :designation
[(ascii 94) (latin-iso8859-1 katakana-jisx0201
96) nil nil
]
1403 :flags
'(ascii-at-eol ascii-at-cntl
1404 designation locking-shift single-shift
))
1406 (define-coding-system 'compound-text-with-extensions
1407 "Compound text encoding with ICCCM Extended Segment extensions.
1409 See the variable `ctext-non-standard-encodings-alist' for the
1410 detail about how extended segments are handled.
1412 This coding system should be used only for X selections. It is inappropriate
1413 for decoding and encoding files, process I/O, etc."
1414 :coding-type
'iso-2022
1416 :charset-list
'iso-2022
1417 :designation
[(ascii 94) (latin-iso8859-1 katakana-jisx0201
96) nil nil
]
1418 :flags
'(ascii-at-eol ascii-at-cntl long-form
1419 designation locking-shift single-shift
)
1420 :post-read-conversion
'ctext-post-read-conversion
1421 :pre-write-conversion
'ctext-pre-write-conversion
)
1423 (define-coding-system-alias
1424 'x-ctext-with-extensions
'compound-text-with-extensions
)
1425 (define-coding-system-alias
1426 'ctext-with-extensions
'compound-text-with-extensions
)
1428 (define-coding-system 'us-ascii
1429 "Encode ASCII as-is and encode non-ASCII characters to `?'."
1430 :coding-type
'charset
1432 :charset-list
'(ascii)
1434 :mime-charset
'us-ascii
)
1436 (define-coding-system-alias 'iso-safe
'us-ascii
)
1438 (define-coding-system 'utf-7
1439 "UTF-7 encoding of Unicode (RFC 2152)."
1442 :mime-charset
'utf-7
1443 :charset-list
'(unicode)
1444 :pre-write-conversion
'utf-7-pre-write-conversion
1445 :post-read-conversion
'utf-7-post-read-conversion
)
1447 (define-coding-system 'utf-7-imap
1448 "UTF-7 encoding of Unicode, IMAP version (RFC 2060)"
1451 :charset-list
'(unicode)
1452 :pre-write-conversion
'utf-7-imap-pre-write-conversion
1453 :post-read-conversion
'utf-7-imap-post-read-conversion
)
1455 ;; Use us-ascii for terminal output if some other coding system is not
1456 ;; specified explicitly.
1457 (set-safe-terminal-coding-system-internal 'us-ascii
)
1459 ;; The other coding-systems are defined in each language specific
1460 ;; files under lisp/language.
1462 ;; Normally, set coding system to `undecided' before reading a file.
1463 ;; Compiled Emacs Lisp files (*.elc) are not decoded at all,
1464 ;; but we regard them as containing multibyte characters.
1465 ;; Tar files are not decoded at all, but we treat them as raw bytes.
1467 (setq file-coding-system-alist
1468 '(("\\.elc\\'" . utf-8-emacs
)
1469 ("\\.utf\\(-8\\)?\\'" . utf-8
)
1470 ("\\.xml\\'" . xml-find-file-coding-system
)
1471 ;; We use raw-text for reading loaddefs.el so that if it
1472 ;; happens to have DOS or Mac EOLs, they are converted to
1473 ;; newlines. This is required to make the special treatment
1474 ;; of the "\ newline" combination in loaddefs.el, which marks
1475 ;; the beginning of a doc string, work.
1476 ("\\(\\`\\|/\\)loaddefs.el\\'" .
(raw-text . raw-text-unix
))
1477 ("\\.tar\\'" .
(no-conversion . no-conversion
))
1478 ( "\\.po[tx]?\\'\\|\\.po\\." . po-find-file-coding-system
)
1479 ("\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" . latexenc-find-file-coding-system
)
1480 ("" .
(undecided . nil
))))
1483 ;;; Setting coding categories and their priorities.
1485 ;; This setting is just to read an Emacs Lisp source files which
1486 ;; contain multilingual text while dumping Emacs. More appropriate
1487 ;; values are set by the command `set-language-environment' for each
1488 ;; language environment.
1490 (set-coding-system-priority
1497 ;;; Miscellaneous settings.
1499 ;; Make all multibyte characters self-insert.
1500 (set-char-table-range (nth 1 global-map
)
1501 (cons 128 (max-char))
1502 'self-insert-command
)
1504 (aset latin-extra-code-table ?
\221 t
)
1505 (aset latin-extra-code-table ?
\222 t
)
1506 (aset latin-extra-code-table ?
\223 t
)
1507 (aset latin-extra-code-table ?
\224 t
)
1508 (aset latin-extra-code-table ?
\225 t
)
1509 (aset latin-extra-code-table ?
\226 t
)
1511 ;; The old code-pages library is obsoleted by coding systems based on
1512 ;; the charsets defined in this file but might be required by user
1514 (provide 'code-pages
)
1517 ;; no-byte-compile: t
1520 ;; arch-tag: 7d5fed55-b6df-42f6-8d3d-0011190551f5
1521 ;;; mule-conf.el ends here