Trailing whitepace deleted.
[bpt/emacs.git] / lisp / international / mule-conf.el
CommitLineData
0a10297a 1;;; mule-conf.el --- configure multilingual environment -*- no-byte-compile: t -*-
08c19a27 2
08c19a27 3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
fa526c4a 4;; Licensed to the Free Software Foundation.
08c19a27
KH
5
6;; Keywords: mule, multilingual, character set, coding system
7
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation; either version 2, or (at your option)
13;; any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs; see the file COPYING. If not, write to the
22;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23;; Boston, MA 02111-1307, USA.
24
25;;; Commentary:
26
27;; Don't byte-compile this file.
28
29;;; Code:
30
31;;; Definitions of character sets.
32
33;; Basic (official) character sets. These character sets are treated
7a860cf2 34;; efficiently with respect to buffer memory.
08c19a27
KH
35
36;; Syntax:
37;; (define-charset CHARSET-ID CHARSET
38;; [ DIMENSION CHARS WIDTH DIRECTION ISO-FINAL-CHAR ISO-GRAPHIC-PLANE
39;; SHORT-NAME LONG-NAME DESCRIPTION ])
40;; ASCII charset is defined in src/charset.c as below.
41;; (define-charset 0 ascii
42;; [1 94 1 0 ?B 0 "ASCII" "ASCII" "ASCII (ISO646 IRV)"])
43
7153b1f1
KH
44;; 1-byte charsets. Valid range of CHARSET-ID is 128..143.
45
46;; CHARSET-ID 128 is not used.
47
08c19a27 48(define-charset 129 'latin-iso8859-1
cead26f6 49 [1 96 1 0 ?A 1 "RHP of Latin-1" "RHP of Latin-1 (ISO 8859-1): ISO-IR-100"
5a6b038a 50 "Right-Hand Part of Latin Alphabet 1 (ISO/IEC 8859-1): ISO-IR-100."])
08c19a27 51(define-charset 130 'latin-iso8859-2
cead26f6 52 [1 96 1 0 ?B 1 "RHP of Latin-2" "RHP of Latin-2 (ISO 8859-2): ISO-IR-101"
5a6b038a 53 "Right-Hand Part of Latin Alphabet 2 (ISO/IEC 8859-2): ISO-IR-101."])
08c19a27 54(define-charset 131 'latin-iso8859-3
cead26f6 55 [1 96 1 0 ?C 1 "RHP of Latin-3" "RHP of Latin-3 (ISO 8859-3): ISO-IR-109"
5a6b038a 56 "Right-Hand Part of Latin Alphabet 3 (ISO/IEC 8859-3): ISO-IR-109."])
08c19a27 57(define-charset 132 'latin-iso8859-4
cead26f6 58 [1 96 1 0 ?D 1 "RHP of Latin-4" "RHP of Latin-4 (ISO 8859-4): ISO-IR-110"
5a6b038a 59 "Right-Hand Part of Latin Alphabet 4 (ISO/IEC 8859-4): ISO-IR-110."])
08c19a27 60(define-charset 133 'thai-tis620
cead26f6 61 [1 96 1 0 ?T 1 "RHP of TIS620" "RHP of Thai (TIS620): ISO-IR-166"
5a6b038a 62 "Right-Hand Part of TIS620.2533 (Thai): ISO-IR-166."])
08c19a27 63(define-charset 134 'greek-iso8859-7
cead26f6 64 [1 96 1 0 ?F 1 "RHP of ISO8859/7" "RHP of Greek (ISO 8859-7): ISO-IR-126"
5a6b038a 65 "Right-Hand Part of Latin/Greek Alphabet (ISO/IEC 8859-7): ISO-IR-126."])
08c19a27 66(define-charset 135 'arabic-iso8859-6
cead26f6 67 [1 96 1 1 ?G 1 "RHP of ISO8859/6" "RHP of Arabic (ISO 8859-6): ISO-IR-127"
5a6b038a 68 "Right-Hand Part of Latin/Arabic Alphabet (ISO/IEC 8859-6): ISO-IR-127."])
08c19a27 69(define-charset 136 'hebrew-iso8859-8
cead26f6 70 [1 96 1 1 ?H 1 "RHP of ISO8859/8" "RHP of Hebrew (ISO 8859-8): ISO-IR-138"
5a6b038a 71 "Right-Hand Part of Latin/Hebrew Alphabet (ISO/IEC 8859-8): ISO-IR-138."])
08c19a27 72(define-charset 137 'katakana-jisx0201
cead26f6 73 [1 94 1 0 ?I 1 "JISX0201 Katakana" "Japanese Katakana (JISX0201.1976)"
5a6b038a 74 "Katakana Part of JISX0201.1976."])
08c19a27 75(define-charset 138 'latin-jisx0201
cead26f6 76 [1 94 1 0 ?J 0 "JISX0201 Roman" "Japanese Roman (JISX0201.1976)"
5a6b038a 77 "Roman Part of JISX0201.1976."])
7153b1f1
KH
78
79;; CHARSET-ID is not used 139.
80
08c19a27 81(define-charset 140 'cyrillic-iso8859-5
cead26f6 82 [1 96 1 0 ?L 1 "RHP of ISO8859/5" "RHP of Cyrillic (ISO 8859-5): ISO-IR-144"
5a6b038a 83 "Right-Hand Part of Latin/Cyrillic Alphabet (ISO/IEC 8859-5): ISO-IR-144."])
08c19a27 84(define-charset 141 'latin-iso8859-9
cead26f6 85 [1 96 1 0 ?M 1 "RHP of Latin-5" "RHP of Latin-5 (ISO 8859-9): ISO-IR-148"
5a6b038a 86 "Right-Hand Part of Latin Alphabet 5 (ISO/IEC 8859-9): ISO-IR-148."])
7a860cf2 87(define-charset 142 'latin-iso8859-15
cead26f6 88 [1 96 1 0 ?b 1 "RHP of Latin-9" "RHP of Latin-9 (ISO 8859-15): ISO-IR-203"
5a6b038a 89 "Right-Hand Part of Latin Alphabet 9 (ISO/IEC 8859-15): ISO-IR-203."])
7a860cf2 90(define-charset 143 'latin-iso8859-14
bdf74bef 91 [1 96 1 0 ?_ 1 "RHP of Latin-8" "RHP of Latin-8 (ISO 8859-14): ISO-IR-199"
5a6b038a 92 "Right-Hand Part of Latin Alphabet 8 (ISO/IEC 8859-14): ISO-IR-199."])
7153b1f1
KH
93
94;; 2-byte charsets. Valid range of CHARSET-ID is 144..153.
95
08c19a27 96(define-charset 144 'japanese-jisx0208-1978
cead26f6 97 [2 94 2 0 ?@ 0 "JISX0208.1978" "JISX0208.1978 (Japanese): ISO-IR-42"
5a6b038a 98 "JISX0208.1978 Japanese Kanji (so called \"old JIS\"): ISO-IR-42."])
08c19a27 99(define-charset 145 'chinese-gb2312
cead26f6 100 [2 94 2 0 ?A 0 "GB2312" "GB2312: ISO-IR-58"
5a6b038a 101 "GB2312 Chinese simplified: ISO-IR-58."])
08c19a27 102(define-charset 146 'japanese-jisx0208
cead26f6 103 [2 94 2 0 ?B 0 "JISX0208" "JISX0208.1983/1990 (Japanese): ISO-IR-87"
5a6b038a 104 "JISX0208.1983/1990 Japanese Kanji: ISO-IR-87."])
08c19a27 105(define-charset 147 'korean-ksc5601
cead26f6 106 [2 94 2 0 ?C 0 "KSC5601" "KSC5601 (Korean): ISO-IR-149"
5a6b038a 107 "KSC5601 Korean Hangul and Hanja: ISO-IR-149."])
08c19a27 108(define-charset 148 'japanese-jisx0212
cead26f6 109 [2 94 2 0 ?D 0 "JISX0212" "JISX0212 (Japanese): ISO-IR-159"
5a6b038a 110 "JISX0212 Japanese supplement: ISO-IR-159."])
08c19a27 111(define-charset 149 'chinese-cns11643-1
cead26f6 112 [2 94 2 0 ?G 0 "CNS11643-1" "CNS11643-1 (Chinese traditional): ISO-IR-171"
5a6b038a 113 "CNS11643 Plane 1 Chinese traditional: ISO-IR-171."])
08c19a27 114(define-charset 150 'chinese-cns11643-2
cead26f6 115 [2 94 2 0 ?H 0 "CNS11643-2" "CNS11643-2 (Chinese traditional): ISO-IR-172"
5a6b038a 116 "CNS11643 Plane 2 Chinese traditional: ISO-IR-172."])
7153b1f1
KH
117(define-charset 151 'japanese-jisx0213-1
118 [2 94 2 0 ?O 0 "JISX0213-1" "JISX0213-1" "JISX0213 Plane 1 (Japanese)"])
08c19a27 119(define-charset 152 'chinese-big5-1
cead26f6 120 [2 94 2 0 ?0 0 "Big5 (Level-1)" "Big5 (Level-1) A141-C67F"
5a6b038a 121 "Frequently used part (A141-C67F) of Big5 (Chinese traditional)."])
08c19a27 122(define-charset 153 'chinese-big5-2
cead26f6 123 [2 94 2 0 ?1 0 "Big5 (Level-2)" "Big5 (Level-2) C940-FEFE"
5a6b038a 124 "Less frequently used part (C940-FEFE) of Big5 (Chinese traditional)."])
08c19a27
KH
125
126;; Additional (private) character sets. These character sets are
7a860cf2 127;; treated less space-efficiently in the buffer.
08c19a27
KH
128
129;; Syntax:
7153b1f1 130;; (define-charset CHARSET-ID CHARSET
08c19a27
KH
131;; [ DIMENSION CHARS WIDTH DIRECTION ISO-FINAL-CHAR ISO-GRAPHIC-PLANE
132;; SHORT-NAME LONG-NAME DESCRIPTION ])
133
134;; ISO-2022 allows a use of character sets not registered in ISO with
135;; final characters `0' (0x30) through `?' (0x3F). Among them, Emacs
136;; reserves `0' through `9' to support several private character sets.
137;; The remaining final characters `:' through `?' are for users.
138
7153b1f1
KH
139;; 1-byte 1-column charsets. Valid range of CHARSET-ID is 160..223.
140
141(define-charset 160 'chinese-sisheng
08c19a27 142 [1 94 1 0 ?0 0 "SiSheng" "SiSheng (PinYin/ZhuYin)"
5a6b038a 143 "Sisheng characters (vowels with tone marks) for Pinyin/Zhuyin."])
08c19a27
KH
144
145;; IPA characters for phonetic symbols.
7153b1f1 146(define-charset 161 'ipa
5a6b038a
WL
147 [1 96 1 0 ?0 1 "IPA" "IPA"
148 "IPA (International Phonetic Association) characters."])
08c19a27
KH
149
150;; Vietnamese VISCII. VISCII is 1-byte character set which contains
151;; more than 96 characters. Since Emacs can't handle it as one
152;; character set, it is divided into two: lower case letters and upper
153;; case letters.
7153b1f1 154(define-charset 162 'vietnamese-viscii-lower
5a6b038a
WL
155 [1 96 1 0 ?1 1 "VISCII lower" "VISCII lower-case"
156 "Vietnamese VISCII1.1 lower-case characters."])
7153b1f1 157(define-charset 163 'vietnamese-viscii-upper
5a6b038a
WL
158 [1 96 1 0 ?2 1 "VISCII upper" "VISCII upper-case"
159 "Vietnamese VISCII1.1 upper-case characters."])
08c19a27
KH
160
161;; For Arabic, we need three different types of character sets.
162;; Digits are of direction left-to-right and of width 1-column.
163;; Others are of direction right-to-left and of width 1-column or
164;; 2-column.
7153b1f1 165(define-charset 164 'arabic-digit
5a6b038a
WL
166 [1 94 1 0 ?2 0 "Arabic digit" "Arabic digit"
167 "Arabic digits."])
7153b1f1 168(define-charset 165 'arabic-1-column
5a6b038a
WL
169 [1 94 1 1 ?3 0 "Arabic 1-col" "Arabic 1-column"
170 "Arabic 1-column width glyphs."])
7153b1f1
KH
171
172;; ASCII with right-to-left direction.
173(define-charset 166 'ascii-right-to-left
174 [1 94 1 1 ?B 0 "rev ASCII" "ASCII with right-to-left direction"
5a6b038a 175 "ASCII (left half of ISO 8859-1) with right-to-left direction."])
7153b1f1
KH
176
177;; Lao script.
178;; ISO10646's 0x0E80..0x0EDF are mapped to 0x20..0x7F.
179(define-charset 167 'lao
5a6b038a
WL
180 [1 94 1 0 ?1 0 "Lao" "Lao"
181 "Lao characters (U+0E80..U+0EDF)."])
7153b1f1 182
e7f614fc 183;; CHARSET-IDs 168..223 are not used.
7153b1f1
KH
184
185;; 1-byte 2-column charsets. Valid range of CHARSET-ID is 224..239.
186
187(define-charset 224 'arabic-2-column
5a6b038a
WL
188 [1 94 2 1 ?4 0 "Arabic 2-col" "Arabic 2-column"
189 "Arabic 2-column glyphs."])
08c19a27 190
7153b1f1
KH
191;; Indian scripts. Symbolic charset for data exchange. Glyphs are
192;; not assigned. They are automatically converted to each Indian
193;; script which IS-13194 supports.
194
195(define-charset 225 'indian-is13194
196 [1 94 2 0 ?5 1 "IS 13194" "Indian IS 13194"
5a6b038a 197 "Generic Indian character set for data exchange with IS 13194."])
7153b1f1
KH
198
199;; CHARSET-IDs 226..239 are not used.
200
16808556
RS
201(define-charset 240 'indian-glyph
202 [2 96 1 0 ?4 0 "Indian glyph" "Indian glyph"
203 "Glyphs for Indian characters."])
204;; 240 used to be [2 94 1 0 ?6 0 "Indian 1-col" "Indian 1 Column"]
205
7153b1f1
KH
206;; 2-byte 1-column charsets. Valid range of CHARSET-ID is 240..244.
207
208;; Actual Glyph for 1-column width.
7153b1f1 209(define-charset 241 'tibetan-1-column
5a6b038a
WL
210 [2 94 1 0 ?8 0 "Tibetan 1-col" "Tibetan 1 column"
211 "Tibetan 1-column glyphs."])
7153b1f1 212
e98a6f1c
KH
213;; Subsets of Unicode.
214
215(define-charset 242 'mule-unicode-2500-33ff
216 [2 96 1 0 ?2 0 "Unicode subset 2" "Unicode subset (U+2500..U+33FF)"
217 "Unicode characters of the range U+2500..U+33FF."])
218
219(define-charset 243 'mule-unicode-e000-ffff
220 [2 96 1 0 ?3 0 "Unicode subset 3" "Unicode subset (U+E000+FFFF)"
221 "Unicode characters of the range U+E000..U+FFFF."])
7153b1f1 222
7153b1f1
KH
223(define-charset 244 'mule-unicode-0100-24ff
224 [2 96 1 0 ?1 0 "Unicode subset" "Unicode subset (U+0100..U+24FF)"
225 "Unicode characters of the range U+0100..U+24FF."])
226
227;; 2-byte 2-column charsets. Valid range of CHARSET-ID is 245..254.
228
7a362b93 229;; Ethiopic characters (Amharic and Tigrigna).
7153b1f1 230(define-charset 245 'ethiopic
5a6b038a
WL
231 [2 94 2 0 ?3 0 "Ethiopic" "Ethiopic characters"
232 "Ethiopic characters."])
08c19a27
KH
233
234;; Chinese CNS11643 Plane3 thru Plane7. Although these are official
235;; character sets, the use is rare and don't have to be treated
7a860cf2 236;; space-efficiently in the buffer.
7153b1f1 237(define-charset 246 'chinese-cns11643-3
cead26f6 238 [2 94 2 0 ?I 0 "CNS11643-3" "CNS11643-3 (Chinese traditional): ISO-IR-183"
5a6b038a 239 "CNS11643 Plane 3 Chinese Traditional: ISO-IR-183."])
7153b1f1 240(define-charset 247 'chinese-cns11643-4
cead26f6 241 [2 94 2 0 ?J 0 "CNS11643-4" "CNS11643-4 (Chinese traditional): ISO-IR-184"
5a6b038a 242 "CNS11643 Plane 4 Chinese Traditional: ISO-IR-184."])
7153b1f1 243(define-charset 248 'chinese-cns11643-5
cead26f6 244 [2 94 2 0 ?K 0 "CNS11643-5" "CNS11643-5 (Chinese traditional): ISO-IR-185"
5a6b038a 245 "CNS11643 Plane 5 Chinese Traditional: ISO-IR-185."])
7153b1f1 246(define-charset 249 'chinese-cns11643-6
cead26f6 247 [2 94 2 0 ?L 0 "CNS11643-6" "CNS11643-6 (Chinese traditional): ISO-IR-186"
5a6b038a 248 "CNS11643 Plane 6 Chinese Traditional: ISO-IR-186."])
7153b1f1 249(define-charset 250 'chinese-cns11643-7
cead26f6 250 [2 94 2 0 ?M 0 "CNS11643-7" "CNS11643-7 (Chinese traditional): ISO-IR-187"
5a6b038a 251 "CNS11643 Plane 7 Chinese Traditional: ISO-IR-187."])
08c19a27 252
08c19a27 253;; Actual Glyph for 2-column width.
7153b1f1 254(define-charset 251 'indian-2-column
2aa72de7 255 [2 94 2 0 ?5 0 "Indian 2-col" "Indian 2 Column"
5a6b038a 256 "Indian character set for 2-column width glyphs."])
16808556
RS
257 ;; old indian-1-column characters will be translated to indian-2-column.
258(declare-equiv-charset 2 94 ?6 'indian-2-column)
08c19a27 259
2aa72de7 260;; Tibetan script.
7153b1f1 261(define-charset 252 'tibetan
5a6b038a
WL
262 [2 94 2 0 ?7 0 "Tibetan 2-col" "Tibetan 2 column"
263 "Tibetan 2-column width glyphs."])
7153b1f1
KH
264
265;; CHARSET-ID 253 is not used.
266
267;; JISX0213 Plane 2
268(define-charset 254 'japanese-jisx0213-2
5a6b038a
WL
269 [2 94 2 0 ?P 0 "JISX0213-2" "JISX0213-2"
270 "JISX0213 Plane 2 (Japanese)."])
2aa72de7 271
85f789f7
KH
272;; Tell C code charset ID's of several charsets.
273(setup-special-charsets)
08c19a27 274
85f789f7 275\f
d2a1ee18
KH
276;; These are tables for translating characters on decoding and
277;; encoding.
f967223b 278(define-translation-table
40e98681
KH
279 'oldjis-newjis-jisroman-ascii
280 (list (cons (make-char 'japanese-jisx0208-1978)
281 (make-char 'japanese-jisx0208))
282 (cons (make-char 'latin-jisx0201) (make-char 'ascii))))
3cd01a6c
KH
283(aset (get 'oldjis-newjis-jisroman-ascii 'translation-table)
284 (make-char 'latin-jisx0201 92) (make-char 'latin-jisx0201 92))
285(aset (get 'oldjis-newjis-jisroman-ascii 'translation-table)
286 (make-char 'latin-jisx0201 126) (make-char 'latin-jisx0201 126))
40e98681 287
f967223b
KH
288(setq standard-translation-table-for-decode
289 (get 'oldjis-newjis-jisroman-ascii 'translation-table))
08c19a27 290
f967223b 291(setq standard-translation-table-for-encode nil)
08c19a27 292
bdf74bef
DL
293(defvar translation-table-for-input nil
294 "If non-nil, a char table used to translate characters from input methods.
295\(Currently only used by Quail.)")
08c19a27
KH
296\f
297;;; Make fundamental coding systems.
298
299;; Miscellaneous coding systems which can't be made by
300;; `make-coding-system'.
301
302(put 'no-conversion 'coding-system
bc6a0946
KH
303 (vector nil ?= "Do no conversion.
304
305When you visit a file with this coding, the file is read into a
306unibyte buffer as is, thus each byte of a file is treated as a
307character."
3fcbab9a
KH
308 (list 'coding-category 'coding-category-binary
309 'alias-coding-systems '(no-conversion))
310 nil))
08c19a27 311(put 'no-conversion 'eol-type 0)
3fcbab9a
KH
312(put 'coding-category-binary 'coding-systems '(no-conversion))
313(setq coding-system-list '(no-conversion))
314(setq coding-system-alist '(("no-conversion")))
38953fe2 315(register-char-codings 'no-conversion t)
08c19a27 316
8da035d0
RS
317(define-coding-system-alias 'binary 'no-conversion)
318
426591c3 319(put 'undecided 'coding-system
76810f60 320 (vector t ?- "No conversion on encoding, automatic conversion on decoding"
08dcf825
KH
321 (list 'alias-coding-systems '(undecided)
322 'safe-charsets '(ascii))
3fcbab9a
KH
323 nil))
324(setq coding-system-list (cons 'undecided coding-system-list))
325(setq coding-system-alist (cons '("undecided") coding-system-alist))
426591c3 326(put 'undecided 'eol-type
3fcbab9a 327 (make-subsidiary-coding-system 'undecided))
08c19a27 328
8d969bf6 329(define-coding-system-alias 'unix 'undecided-unix)
1c445211
RS
330(define-coding-system-alias 'dos 'undecided-dos)
331(define-coding-system-alias 'mac 'undecided-mac)
332
08c19a27
KH
333;; Coding systems not specific to each language environment.
334
335(make-coding-system
426591c3 336 'emacs-mule 0 ?=
695ac440 337 "Emacs internal format used in buffer and string.
bc6a0946 338
695ac440
KH
339Encoding text with this coding system produces the actual byte
340sequence of the text in buffers and strings. An exception is made for
341eight-bit-control characters. Each of them is encoded into a single
342byte."
40e98681 343 nil
06859d9e
KH
344 '((safe-charsets . t)
345 (composition . t)))
08c19a27 346
2cb30410
KH
347(make-coding-system
348 'raw-text 5 ?t
695ac440
KH
349 "Raw text, which means text contains random 8-bit codes.
350Encoding text with this coding system produces the actual byte
351sequence of the text in buffers and strings. An exception is made for
352eight-bit-control characters. Each of them is encoded into a single
bc6a0946
KH
353byte.
354
355When you visit a file with this coding, the file is read into a
356unibyte buffer as is (except for EOL format), thus each byte of a file
357is treated as a character."
40e98681
KH
358 nil
359 '((safe-charsets . t)))
2cb30410 360
08c19a27 361(make-coding-system
4951a271
KH
362 'iso-2022-7bit 2 ?J
363 "ISO 2022 based 7-bit encoding using only G0"
08c19a27 364 '((ascii t) nil nil nil
fec0e02d 365 short ascii-eol ascii-cntl seven)
ccac3d77
KH
366 '((safe-charsets . t)
367 (composition . t)))
08c19a27
KH
368
369(make-coding-system
2792ce16 370 'iso-2022-7bit-ss2 2 ?$
4951a271
KH
371 "ISO 2022 based 7-bit encoding using SS2 for 96-charset"
372 '((ascii t) nil t nil
fec0e02d 373 short ascii-eol ascii-cntl seven nil single-shift)
ccac3d77
KH
374 '((safe-charsets . t)
375 (composition . t)))
4951a271
KH
376
377(make-coding-system
2792ce16 378 'iso-2022-7bit-lock 2 ?&
4951a271
KH
379 "ISO-2022 coding system using Locking-Shift for 96-charset"
380 '((ascii t) t nil nil
fec0e02d 381 nil ascii-eol ascii-cntl seven locking-shift)
ccac3d77
KH
382 '((safe-charsets . t)
383 (composition . t)))
4951a271 384
2e21aa27 385(define-coding-system-alias 'iso-2022-int-1 'iso-2022-7bit-lock)
08c19a27
KH
386
387(make-coding-system
4951a271 388 'iso-2022-7bit-lock-ss2 2 ?i
d0c5d809 389 "Mixture of ISO-2022-JP, ISO-2022-KR, and ISO-2022-CN"
08c19a27
KH
390 '((ascii t)
391 (nil korean-ksc5601 chinese-gb2312 chinese-cns11643-1 t)
392 (nil chinese-cns11643-2)
393 (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
394 chinese-cns11643-6 chinese-cns11643-7)
d0c5d809 395 short ascii-eol ascii-cntl seven locking-shift single-shift nil nil nil
fec0e02d 396 init-bol)
3374b353 397 '((safe-charsets ascii japanese-jisx0208 japanese-jisx0208-1978 latin-jisx0201
40e98681
KH
398 korean-ksc5601 chinese-gb2312 chinese-cns11643-1
399 chinese-cns11643-2 chinese-cns11643-3 chinese-cns11643-4
ccac3d77
KH
400 chinese-cns11643-5 chinese-cns11643-6 chinese-cns11643-7)
401 (composition . t)))
08c19a27 402
2e21aa27 403(define-coding-system-alias 'iso-2022-cjk 'iso-2022-7bit-lock-ss2)
08c19a27
KH
404
405(make-coding-system
4951a271
KH
406 'iso-2022-8bit-ss2 2 ?@
407 "ISO 2022 based 8-bit encoding using SS2 for 96-charset"
08c19a27 408 '((ascii t) nil t nil
fec0e02d 409 nil ascii-eol ascii-cntl nil nil single-shift)
ccac3d77
KH
410 '((safe-charsets . t)
411 (composition . t)))
08c19a27 412
d49a4835 413(make-coding-system
cb5be6c9 414 'compound-text 2 ?x
73066974
EZ
415 "Compound text based generic encoding for decoding unknown messages.
416
e11cf111 417This coding system does not support extended segments."
5259f34b 418 '((ascii t) (latin-iso8859-1 katakana-jisx0201 t) t t
d49a4835
KH
419 nil ascii-eol ascii-cntl nil locking-shift single-shift nil nil nil
420 init-bol nil nil)
421 '((safe-charsets . t)
ccac3d77
KH
422 (mime-charset . x-ctext)
423 (composition . t)))
d49a4835 424
cb5be6c9
EZ
425(define-coding-system-alias 'x-ctext 'compound-text)
426(define-coding-system-alias 'ctext 'compound-text)
73066974 427
cb5be6c9
EZ
428;; Same as compound-text, but doesn't produce composition escape
429;; sequences. Used in post-read and pre-write conversions of
430;; compound-text-with-extensions, see mule.el. Note that this should
431;; not have a mime-charset property, to prevent it from showing up
432;; close to the beginning of coding systems ordered by priority.
73066974
EZ
433(make-coding-system
434 'ctext-no-compositions 2 ?x
435 "Compound text based generic encoding for decoding unknown messages.
436
cb5be6c9 437Like `compound-text', but does not produce escape sequences for compositions."
73066974
EZ
438 '((ascii t) (latin-iso8859-1 katakana-jisx0201 t) t t
439 nil ascii-eol ascii-cntl nil locking-shift single-shift nil nil nil
440 init-bol nil nil)
cb5be6c9 441 '((safe-charsets . t)))
73066974
EZ
442
443(make-coding-system
cb5be6c9 444 'compound-text-with-extensions 5 ?x
e11cf111 445 "Compound text encoding with extended segments.
73066974
EZ
446
447This coding system should be used only for X selections. It is inappropriate
448for decoding and encoding files, process I/O, etc."
449 nil
450 '((post-read-conversion . ctext-post-read-conversion)
451 (pre-write-conversion . ctext-pre-write-conversion)))
452
cb5be6c9
EZ
453(define-coding-system-alias
454 'x-ctext-with-extensions 'compound-text-with-extensions)
455(define-coding-system-alias
456 'ctext-with-extensions 'compound-text-with-extensions)
75b6fb58 457
f6eb8ace
KH
458(make-coding-system
459 'iso-safe 2 ?-
e11cf111 460 "Encode ASCII asis and encode non-ASCII characters to `?'."
f6eb8ace 461 '(ascii nil nil nil
fec0e02d 462 nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil t)
40e98681 463 '((safe-charsets ascii)))
f6eb8ace 464
9f13685a
KH
465(define-coding-system-alias
466 'us-ascii 'iso-safe)
467
5b984695 468;; Use iso-safe for terminal output if some other coding system is not
e8dd0160 469;; specified explicitly.
f6eb8ace
KH
470(set-safe-terminal-coding-system-internal 'iso-safe)
471
08c19a27
KH
472;; The other coding-systems are defined in each language specific
473;; section of languages.el.
474
678dc7ec
RS
475;; Normally, set coding system to `undecided' before reading a file.
476;; Compiled Emacs Lisp files (*.elc) are not decoded at all,
477;; but we regard them as containing multibyte characters.
478;; Tar files are not decoded at all, but we treat them as raw bytes.
08c19a27 479
4951a271 480(setq file-coding-system-alist
2238f751 481 '(("\\.elc\\'" . (emacs-mule . emacs-mule))
bdf74bef 482 ("\\.utf\\(-8\\)?\\'" . utf-8)
3e88bb50
EZ
483 ;; We use raw-text for reading loaddefs.el so that if it
484 ;; happens to have DOS or Mac EOLs, they are converted to
485 ;; newlines. This is required to make the special treatment
486 ;; of the "\ newline" combination in loaddefs.el, which marks
487 ;; the beginning of a doc string, work.
488 ("\\(\\`\\|/\\)loaddefs.el\\'" . (raw-text . raw-text-unix))
2238f751 489 ("\\.tar\\'" . (no-conversion . no-conversion))
518a0981 490 ( "\\.po[tx]?\\'\\|\\.po\\." . po-find-file-coding-system)
4951a271 491 ("" . (undecided . nil))))
08c19a27
KH
492
493\f
494;;; Setting coding categories and their priorities.
495
496;; This setting is just to read an Emacs Lisp source files which
497;; contain multilingual text while dumping Emacs. More appropriate
2792ce16 498;; values are set by the command `set-language-environment' for each
08c19a27
KH
499;; language environment.
500
29742cb5
KH
501(setq coding-category-emacs-mule 'emacs-mule
502 coding-category-sjis 'japanese-shift-jis
503 coding-category-iso-7 'iso-2022-7bit
40e98681 504 coding-category-iso-7-tight 'iso-2022-jp
29742cb5 505 coding-category-iso-8-1 'iso-latin-1
5b984695 506 coding-category-iso-8-2 'iso-latin-1
29742cb5
KH
507 coding-category-iso-7-else 'iso-2022-7bit-lock
508 coding-category-iso-8-else 'iso-2022-8bit-ss2
a1223d6c 509 coding-category-ccl nil
f8499efb 510 coding-category-utf-8 'mule-utf-8
2c7794b0
KH
511 coding-category-utf-16-be nil
512 coding-category-utf-16-le nil
29742cb5 513 coding-category-big5 'chinese-big5
2cb30410 514 coding-category-raw-text 'raw-text
29742cb5 515 coding-category-binary 'no-conversion)
08c19a27
KH
516
517(set-coding-priority
5b984695 518 '(coding-category-iso-8-1
69b73c8a 519 coding-category-iso-8-2
5b984695
KH
520 coding-category-iso-7-tight
521 coding-category-iso-7
29742cb5 522 coding-category-iso-7-else
2cb30410 523 coding-category-iso-8-else
e4e6cfa0 524 coding-category-emacs-mule
2cb30410 525 coding-category-raw-text
a1506d29 526 coding-category-sjis
08c19a27 527 coding-category-big5
a1223d6c 528 coding-category-ccl
2c7794b0 529 coding-category-binary
ce7ed3aa 530 coding-category-utf-8
2c7794b0 531 coding-category-utf-16-be
f8499efb 532 coding-category-utf-16-le))
08c19a27 533
c1b628eb
KH
534\f
535;;; Miscellaneous settings.
536(aset latin-extra-code-table ?\222 t)
40232452
KH
537(aset latin-extra-code-table ?\223 t)
538(aset latin-extra-code-table ?\224 t)
c1b628eb 539
4cb4b388
KH
540(update-coding-systems-internal)
541
08c19a27 542;;; mule-conf.el ends here