Commit | Line | Data |
---|---|---|
e8af40ee | 1 | ;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*- |
4ed46869 | 2 | |
891258f2 | 3 | ;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN. |
fa526c4a | 4 | ;; Licensed to the Free Software Foundation. |
4ed46869 KH |
5 | |
6 | ;; Keywords: multilingual, European | |
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 | |
369314dc KH |
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. | |
4ed46869 KH |
24 | |
25 | ;;; Commentary: | |
26 | ||
cce3ba48 | 27 | ;; For Europeans, character sets ISO8859-1,2,3,4,9,14,15 are supported. |
4ed46869 KH |
28 | |
29 | ;;; Code: | |
30 | ||
5c4794f3 | 31 | ;; Latin-1 (ISO-8859-1) |
335a7ad7 | 32 | |
4ed46869 | 33 | (make-coding-system |
4b9121fc | 34 | 'iso-latin-1 2 ?1 |
b775a472 | 35 | "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)" |
3617715a KH |
36 | '(ascii latin-iso8859-1 nil nil |
37 | nil nil nil nil nil nil nil nil nil nil nil nil t) | |
38 | '((safe-charsets ascii latin-iso8859-1) | |
39 | (mime-charset . iso-8859-1))) | |
4ed46869 | 40 | |
71eabd24 | 41 | (define-coding-system-alias 'iso-8859-1 'iso-latin-1) |
300c450d | 42 | (define-coding-system-alias 'latin-1 'iso-latin-1) |
3617715a | 43 | |
335a7ad7 | 44 | (set-language-info-alist |
bed54678 | 45 | "Latin-1" '((charset ascii latin-iso8859-1) |
3617715a KH |
46 | (coding-system iso-latin-1) |
47 | (coding-priority iso-latin-1) | |
bed54678 | 48 | (nonascii-translation . latin-iso8859-1) |
16b2eb50 | 49 | (unibyte-syntax . "latin-1") |
bed54678 | 50 | (unibyte-display . iso-latin-1) |
3e56710f | 51 | (input-method . "latin-1-prefix") |
5c4794f3 RS |
52 | (sample-text |
53 | . "Hello, Hej, Tere, Hei, Bonjour, Gr\e,A|_\e(B Gott, Ciao, \e,A!\e(BHola!") | |
3617715a | 54 | (documentation . "\ |
cce3ba48 DL |
55 | This language environment is a generic one for the Latin-1 (ISO-8859-1) |
56 | character set which supports the following European languages: | |
57 | Albanian, Basque, Breton, Catalan, Danish, Dutch, English, Faeroese, | |
58 | Finnish, French (with restrictions -- see Latin-9), Frisian, Galician, | |
59 | German, Greenlandic, Icelandic, Irish Gaelic (new orthography), | |
60 | Italian, Latin, Luxemburgish, Norwegian, Portuguese, Rhaeto-Romanic, | |
61 | Scottish Gaelic, Spanish, and Swedish. | |
cd53f29e KH |
62 | We also have specific language environments for the following languages: |
63 | For Dutch, \"Dutch\". | |
64 | For German, \"German\". | |
65 | For Spanish, \"Spanish\". | |
cce3ba48 DL |
66 | |
67 | Latin-1 also covers several written languages outside Europe, including | |
68 | Indonesian/Malay, Tagalog (Philippines), Swahili and Afrikaans.")) | |
3617715a KH |
69 | '("European")) |
70 | ||
335a7ad7 | 71 | \f |
5c4794f3 | 72 | ;; Latin-2 (ISO-8859-2) |
335a7ad7 | 73 | |
4ed46869 | 74 | (make-coding-system |
4b9121fc KH |
75 | 'iso-latin-2 2 ?2 |
76 | "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)" | |
3617715a KH |
77 | '(ascii latin-iso8859-2 nil nil |
78 | nil nil nil nil nil nil nil) | |
79 | '((safe-charsets ascii latin-iso8859-2) | |
80 | (mime-charset . iso-8859-2))) | |
4ed46869 | 81 | |
71eabd24 | 82 | (define-coding-system-alias 'iso-8859-2 'iso-latin-2) |
300c450d | 83 | (define-coding-system-alias 'latin-2 'iso-latin-2) |
4b9121fc | 84 | |
335a7ad7 | 85 | (set-language-info-alist |
bed54678 | 86 | "Latin-2" '((charset ascii latin-iso8859-2) |
3617715a KH |
87 | (coding-system iso-latin-2) |
88 | (coding-priority iso-latin-2) | |
bed54678 | 89 | (nonascii-translation . latin-iso8859-2) |
16b2eb50 | 90 | (unibyte-syntax . "latin-2") |
bed54678 | 91 | (unibyte-display . iso-latin-2) |
3e56710f | 92 | (input-method . "latin-2-prefix") |
3617715a | 93 | (documentation . "\ |
cce3ba48 | 94 | This language environment is a generic one for the Latin-2 (ISO-8859-2) |
e325120d | 95 | character set which supports the following languages: |
60763153 | 96 | Albanian, Czech, English, German, Hungarian, Polish, Romanian, |
59c1ccf2 | 97 | Serbo-Croatian or Croatian, Slovak, Slovene, Sorbian (upper and lower), |
e325120d KH |
98 | and Swedish. |
99 | We also have specific language environments for the following languages: | |
100 | For Czech, \"Czech\". | |
101 | For Romanian, \"Romanian\". | |
102 | For Slovak, \"Slovak\".")) | |
3617715a KH |
103 | '("European")) |
104 | ||
335a7ad7 | 105 | \f |
5c4794f3 | 106 | ;; Latin-3 (ISO-8859-3) |
335a7ad7 | 107 | |
4ed46869 | 108 | (make-coding-system |
4b9121fc KH |
109 | 'iso-latin-3 2 ?3 |
110 | "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)" | |
3617715a KH |
111 | '(ascii latin-iso8859-3 nil nil |
112 | nil nil nil nil nil nil nil) | |
113 | '((safe-charsets ascii latin-iso8859-3) | |
114 | (mime-charset . iso-8859-3))) | |
4ed46869 | 115 | |
71eabd24 | 116 | (define-coding-system-alias 'iso-8859-3 'iso-latin-3) |
300c450d | 117 | (define-coding-system-alias 'latin-3 'iso-latin-3) |
4b9121fc | 118 | |
335a7ad7 | 119 | (set-language-info-alist |
bed54678 | 120 | "Latin-3" '((charset ascii latin-iso8859-3) |
3617715a KH |
121 | (coding-system iso-latin-3) |
122 | (coding-priority iso-latin-3) | |
bed54678 | 123 | (nonascii-translation . latin-iso8859-3) |
16b2eb50 | 124 | (unibyte-syntax . "latin-3") |
bed54678 | 125 | (unibyte-display . iso-latin-3) |
3e56710f | 126 | (input-method . "latin-3-prefix") |
3617715a | 127 | (documentation . "\ |
60763153 RS |
128 | These languages are supported with the Latin-3 (ISO-8859-3) character set: |
129 | Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician, | |
3617715a KH |
130 | German, Italian, Maltese, Spanish, and Turkish.")) |
131 | '("European")) | |
132 | ||
335a7ad7 | 133 | \f |
5c4794f3 | 134 | ;; Latin-4 (ISO-8859-4) |
335a7ad7 | 135 | |
4ed46869 | 136 | (make-coding-system |
4b9121fc KH |
137 | 'iso-latin-4 2 ?4 |
138 | "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)" | |
3617715a KH |
139 | '(ascii latin-iso8859-4 nil nil |
140 | nil nil nil nil nil nil nil) | |
141 | '((safe-charsets ascii latin-iso8859-4) | |
8585266f | 142 | (mime-charset . iso-8859-4))) |
4ed46869 | 143 | |
71eabd24 | 144 | (define-coding-system-alias 'iso-8859-4 'iso-latin-4) |
300c450d | 145 | (define-coding-system-alias 'latin-4 'iso-latin-4) |
4b9121fc | 146 | |
335a7ad7 | 147 | (set-language-info-alist |
bed54678 | 148 | "Latin-4" '((charset ascii latin-iso8859-4) |
3617715a KH |
149 | (coding-system iso-8859-4) |
150 | (coding-priority iso-8859-4) | |
bed54678 | 151 | (nonascii-translation . latin-iso8859-4) |
16b2eb50 | 152 | (unibyte-syntax . "latin-4") |
bed54678 | 153 | (unibyte-display . iso-8859-4) |
11f340ed | 154 | (input-method . "latin-4-postfix") |
3617715a | 155 | (documentation . "\ |
60763153 RS |
156 | These languages are supported with the Latin-4 (ISO-8859-4) character set: |
157 | Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, | |
3617715a KH |
158 | Latvian, Lithuanian, and Norwegian.")) |
159 | '("European")) | |
160 | ||
335a7ad7 | 161 | \f |
5c4794f3 | 162 | ;; Latin-5 (ISO-8859-9) |
335a7ad7 | 163 | |
4ed46869 | 164 | (make-coding-system |
4b9121fc KH |
165 | 'iso-latin-5 2 ?9 |
166 | "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)" | |
3617715a KH |
167 | '(ascii latin-iso8859-9 nil nil |
168 | nil nil nil nil nil nil nil) | |
169 | '((safe-charsets ascii latin-iso8859-9) | |
170 | (mime-charset . iso-8859-9))) | |
4ed46869 | 171 | |
71eabd24 | 172 | (define-coding-system-alias 'iso-8859-9 'iso-latin-5) |
300c450d | 173 | (define-coding-system-alias 'latin-5 'iso-latin-5) |
4b9121fc | 174 | |
3617715a | 175 | (set-language-info-alist |
bed54678 | 176 | "Latin-5" '((charset ascii latin-iso8859-9) |
3617715a KH |
177 | (coding-system iso-latin-5) |
178 | (coding-priority iso-latin-5) | |
bed54678 | 179 | (nonascii-translation . latin-iso8859-9) |
16b2eb50 | 180 | (unibyte-syntax . "latin-5") |
bed54678 | 181 | (unibyte-display . iso-latin-5) |
11f340ed | 182 | (input-method . "latin-5-postfix") |
3617715a | 183 | (documentation . "\ |
cce3ba48 DL |
184 | These languages are supported with the Latin-5 (ISO-8859-9) character set: |
185 | Bulgarian, Byelorussian, (Slavic) Macedonian, Russian, Serbian and | |
186 | Ukranian.")) ; says ISO 8859-1 | |
187 | '("European")) | |
188 | ||
189 | \f | |
190 | ;; Latin-8 (ISO-8859-14) | |
191 | ||
192 | (make-coding-system | |
193 | 'iso-latin-8 2 ?W ; `W' for `Welsh', since `C' | |
194 | ; for `Celtic' is taken. | |
195 | "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)" | |
196 | '(ascii latin-iso8859-14 nil nil | |
197 | nil nil nil nil nil nil nil nil nil nil nil nil t) | |
198 | '((safe-charsets ascii latin-iso8859-14) | |
199 | (mime-charset . iso-8859-14))) | |
200 | ||
201 | (define-coding-system-alias 'iso-8859-14 'iso-latin-8) | |
202 | (define-coding-system-alias 'latin-8 'iso-latin-8) | |
203 | ||
cce3ba48 DL |
204 | (set-language-info-alist |
205 | "Latin-8" '((charset ascii latin-iso8859-14) | |
206 | (coding-system iso-latin-8) | |
207 | (coding-priority iso-latin-8) | |
208 | (nonascii-translation . latin-iso8859-14) | |
209 | (unibyte-syntax . "latin-8") | |
210 | (unibyte-display . iso-latin-8) | |
27ff18c9 DL |
211 | (input-method . "latin-8-prefix") |
212 | ;; Fixme: Welsh/Ga{e}lic greetings | |
213 | (sample-text . "\e,_"\e(B \e,_p\e(B \e,_^\e(B") | |
cce3ba48 DL |
214 | (documentation . "\ |
215 | This language environment is a generic one for the Latin-8 (ISO-8859-14) | |
27ff18c9 DL |
216 | character set which supports the Celtic languages, including those not |
217 | covered by other ISO-8859 character sets: Welsh, Manx Gaelic and | |
af480bd8 | 218 | Irish Gaelic (old orthography).")) |
3617715a | 219 | '("European")) |
cce3ba48 DL |
220 | \f |
221 | ;; Latin-9 (ISO-8859-15) | |
222 | ||
223 | (make-coding-system | |
224 | 'iso-latin-9 2 ?0 ; `0' for `Latin-0' | |
225 | "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)" | |
226 | '(ascii latin-iso8859-15 nil nil | |
227 | nil nil nil nil nil nil nil nil nil nil nil nil t) | |
228 | '((safe-charsets ascii latin-iso8859-15) | |
229 | (mime-charset . iso-8859-15))) | |
230 | ||
231 | (define-coding-system-alias 'iso-8859-15 'iso-latin-9) | |
232 | (define-coding-system-alias 'latin-9 'iso-latin-9) | |
233 | (define-coding-system-alias 'latin-0 'iso-latin-9) | |
3617715a | 234 | |
cce3ba48 DL |
235 | (set-language-info-alist |
236 | "Latin-9" '((charset ascii latin-iso8859-15) | |
237 | (coding-system iso-latin-9) | |
238 | (coding-priority iso-latin-9) | |
239 | (nonascii-translation . latin-iso8859-15) | |
240 | (unibyte-syntax . "latin-9") | |
241 | (unibyte-display . iso-latin-9) | |
27ff18c9 | 242 | (input-method . "latin-9-prefix") |
cce3ba48 | 243 | (sample-text |
27ff18c9 | 244 | . "AVE. \e,b&(48<=>\e(B \e,b$\e(B") |
cce3ba48 DL |
245 | (documentation . "\ |
246 | This language environment is a generic one for the Latin-9 (ISO-8859-15) | |
247 | character set which supports the same languages as Latin-1 with the | |
248 | addition of the Euro sign and some additional French and Finnish letters. | |
249 | Latin-9 is sometimes nicknamed `Latin-0'.")) | |
250 | '("European")) | |
3617715a | 251 | \f |
4ed46869 | 252 | (set-language-info-alist |
bed54678 | 253 | "German" '((tutorial . "TUTORIAL.de") |
3617715a KH |
254 | (charset ascii latin-iso8859-1) |
255 | (coding-system iso-latin-1) | |
256 | (coding-priority iso-latin-1) | |
3e56710f | 257 | (input-method . "german-postfix") |
bed54678 | 258 | (nonascii-translation . iso-latin-1) |
16b2eb50 | 259 | (unibyte-syntax . "latin-1") |
bed54678 | 260 | (unibyte-display . iso-latin-1) |
3617715a KH |
261 | (sample-text . "\ |
262 | German (Deutsch Nord) Guten Tag | |
263 | German (Deutsch S\e,A|\e(Bd) Gr\e,A|_\e(B Gott") | |
264 | (documentation . "\ | |
265 | This language environment is almost the same as Latin-1, | |
266 | but default input method is set to \"german-postfix\".")) | |
267 | '("European")) | |
8dfef503 | 268 | |
e0980142 RS |
269 | (set-language-info-alist |
270 | "Slovenian" '((charset . (ascii latin-iso8859-2)) | |
271 | (coding-system . (iso-8859-2)) | |
272 | (coding-priority . (iso-8859-2)) | |
273 | (nonascii-translation . latin-iso8859-2) | |
274 | (input-method . "latin-2-postfix") | |
275 | (unibyte-syntax . "latin-2") | |
276 | (unibyte-display . iso-8859-2) | |
277 | (tutorial . "TUTORIAL.sl") | |
278 | (sample-text . "\e,B.\e(Belimo vam uspe\e,B9\e(Ben dan!") | |
279 | (documentation . t)) | |
280 | '("European")) | |
281 | ||
891258f2 GM |
282 | (set-language-info-alist |
283 | "Spanish" '((tutorial . "TUTORIAL.es") | |
284 | (charset ascii latin-iso8859-1) | |
285 | (coding-system iso-latin-1) | |
286 | (coding-priority iso-latin-1) | |
287 | (input-method . "spanish-postfix") | |
288 | (nonascii-translation . iso-latin-1) | |
289 | (unibyte-syntax . "latin-1") | |
290 | (unibyte-display . iso-latin-1) | |
291 | (sample-text . "Spanish (Espa\e,Aq\e(Bol) \e,A!\e(BHola!") | |
292 | (documentation . "\ | |
293 | This language environment is almost the same as Latin-1, | |
294 | but default input method is set to \"spanish-postfix\", | |
295 | and select's the Spanish tutorial.")) | |
296 | '("European")) | |
297 | ||
298 | (set-language-info-alist | |
299 | "Dutch" '((tutorial . "TUTORIAL.nl") | |
300 | (charset ascii latin-iso8859-1) | |
301 | (coding-system iso-latin-1) | |
302 | (coding-priority iso-latin-1) | |
303 | (nonascii-translation . iso-latin-1) | |
304 | (unibyte-syntax . "latin-1") | |
305 | (unibyte-display . iso-latin-1) | |
306 | (sample-text . "Er is een aantal manieren waarop je dit kan doen") | |
307 | (documentation . "\ | |
308 | This language environment is almost the same as Latin-1, | |
309 | but select's the Dutch tutorial.")) | |
310 | '("European")) | |
311 | ||
d22c4fb9 KH |
312 | ;; For Turkish, the character set ISO-8859-9 (Latin-5) is used. But, |
313 | ;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3) | |
314 | ;; was used for Turkish. Those who use Latin-3 for Turkish should use | |
315 | ;; "Latin-3" language environment. | |
316 | ||
317 | (set-language-info-alist | |
318 | "Turkish" '((charset ascii latin-iso8859-9) | |
319 | (coding-system iso-latin-5) | |
320 | (coding-priority iso-latin-5) | |
321 | (nonascii-translation . latin-iso8859-9) | |
322 | (unibyte-syntax . "latin-5") | |
323 | (unibyte-display . iso-latin-5) | |
324 | (input-method . "turkish-postfix") | |
325 | (sample-text . "Turkish (T\e,M|\e(Brk\e,Mg\e(Be) Merhaba") | |
326 | (documentation . t))) | |
327 | ||
b9427ca6 KH |
328 | ;; Polish ISO 8859-2 environment. |
329 | ;; Maintainer: Wlodek Bzyl <matwb@univ.gda.pl> | |
330 | ;; Keywords: multilingual, Polish | |
331 | ||
b9427ca6 KH |
332 | (set-language-info-alist |
333 | "Polish" '((charset . (ascii latin-iso8859-2)) | |
334 | (coding-system . (iso-8859-2)) | |
335 | (coding-priority . (iso-8859-2)) | |
336 | (input-method . "polish-slash") | |
337 | (nonascii-translation . latin-iso8859-2) | |
338 | (unibyte-syntax . "latin-2") | |
339 | (unibyte-display . iso-8859-2) | |
340 | (tutorial . "TUTORIAL.pl") | |
2a52f40e | 341 | (sample-text . "P\e,Bs\e(Bjd\e,B<\e(B, ki\e,Bq\e(B-\e,B?\e(Be t\e,Bj\e(B chmurno\e,B6f\e(B w g\e,B31\e(Bb flaszy") |
b9427ca6 KH |
342 | (documentation . t)) |
343 | '("European")) | |
344 | ||
71070f12 KH |
345 | \f |
346 | ;; Definitions for the Mac Roman character sets and coding system. | |
347 | ;; The Mac Roman encoding uses all 128 code points in the range 128 to | |
a75f7176 | 348 | ;; 255 for actual characters. Emacs decodes them to one of the |
71070f12 KH |
349 | ;; following character sets. |
350 | ;; ascii, latin-iso8859-1, mule-unicode-0100-24ff, | |
351 | ;; mule-unicode-2500-33ff, mule-unicode-e000-ffff | |
352 | ||
353 | (let | |
354 | ((encoding-vector (make-vector 256 nil)) | |
355 | (i 0) | |
356 | (vec ;; mac-roman (128..255) -> UCS mapping | |
357 | [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS | |
358 | #x00C5 ;; 129:LATIN CAPITAL LETTER A WITH RING ABOVE | |
359 | #x00C7 ;; 130:LATIN CAPITAL LETTER C WITH CEDILLA | |
360 | #x00C9 ;; 131:LATIN CAPITAL LETTER E WITH ACUTE | |
361 | #x00D1 ;; 132:LATIN CAPITAL LETTER N WITH TILDE | |
362 | #x00D6 ;; 133:LATIN CAPITAL LETTER O WITH DIAERESIS | |
363 | #x00DC ;; 134:LATIN CAPITAL LETTER U WITH DIAERESIS | |
364 | #x00E1 ;; 135:LATIN SMALL LETTER A WITH ACUTE | |
365 | #x00E0 ;; 136:LATIN SMALL LETTER A WITH GRAVE | |
366 | #x00E2 ;; 137:LATIN SMALL LETTER A WITH CIRCUMFLEX | |
367 | #x00E4 ;; 138:LATIN SMALL LETTER A WITH DIAERESIS | |
368 | #x00E3 ;; 139:LATIN SMALL LETTER A WITH TILDE | |
369 | #x00E5 ;; 140:LATIN SMALL LETTER A WITH RING ABOVE | |
370 | #x00E7 ;; 141:LATIN SMALL LETTER C WITH CEDILLA | |
371 | #x00E9 ;; 142:LATIN SMALL LETTER E WITH ACUTE | |
372 | #x00E8 ;; 143:LATIN SMALL LETTER E WITH GRAVE | |
373 | #x00EA ;; 144:LATIN SMALL LETTER E WITH CIRCUMFLEX | |
374 | #x00EB ;; 145:LATIN SMALL LETTER E WITH DIAERESIS | |
375 | #x00ED ;; 146:LATIN SMALL LETTER I WITH ACUTE | |
376 | #x00EC ;; 147:LATIN SMALL LETTER I WITH GRAVE | |
377 | #x00EE ;; 148:LATIN SMALL LETTER I WITH CIRCUMFLEX | |
378 | #x00EF ;; 149:LATIN SMALL LETTER I WITH DIAERESIS | |
379 | #x00F1 ;; 150:LATIN SMALL LETTER N WITH TILDE | |
380 | #x00F3 ;; 151:LATIN SMALL LETTER O WITH ACUTE | |
381 | #x00F2 ;; 152:LATIN SMALL LETTER O WITH GRAVE | |
382 | #x00F4 ;; 153:LATIN SMALL LETTER O WITH CIRCUMFLEX | |
383 | #x00F6 ;; 154:LATIN SMALL LETTER O WITH DIAERESIS | |
384 | #x00F5 ;; 155:LATIN SMALL LETTER O WITH TILDE | |
385 | #x00FA ;; 156:LATIN SMALL LETTER U WITH ACUTE | |
386 | #x00F9 ;; 157:LATIN SMALL LETTER U WITH GRAVE | |
387 | #x00FB ;; 158:LATIN SMALL LETTER U WITH CIRCUMFLEX | |
388 | #x00FC ;; 159:LATIN SMALL LETTER U WITH DIAERESIS | |
389 | #x2020 ;; 160:DAGGER | |
390 | #x00B0 ;; 161:DEGREE SIGN | |
391 | #x00A2 ;; 162:CENT SIGN | |
392 | #x00A3 ;; 163:POUND SIGN | |
393 | #x00A7 ;; 164:SECTION SIGN | |
394 | #x2022 ;; 165:BULLET | |
395 | #x00B6 ;; 166:PILCROW SIGN | |
396 | #x00DF ;; 167:LATIN SMALL LETTER SHARP S | |
397 | #x00AE ;; 168:REGISTERED SIGN | |
398 | #x00A9 ;; 169:COPYRIGHT SIGN | |
399 | #x2122 ;; 170:TRADE MARK SIGN | |
400 | #x00B4 ;; 171:ACUTE ACCENT | |
401 | #x00A8 ;; 172:DIAERESIS | |
402 | #x2260 ;; 173:NOT EQUAL TO | |
403 | #x00C6 ;; 174:LATIN CAPITAL LETTER AE | |
404 | #x00D8 ;; 175:LATIN CAPITAL LETTER O WITH STROKE | |
405 | #x221E ;; 176:INFINITY | |
406 | #x00B1 ;; 177:PLUS-MINUS SIGN | |
407 | #x2264 ;; 178:LESS-THAN OR EQUAL TO | |
408 | #x2265 ;; 179:GREATER-THAN OR EQUAL TO | |
409 | #x00A5 ;; 180:YEN SIGN | |
410 | #x00B5 ;; 181:MICRO SIGN | |
411 | #x2202 ;; 182:PARTIAL DIFFERENTIAL | |
412 | #x2211 ;; 183:N-ARY SUMMATION | |
413 | #x220F ;; 184:N-ARY PRODUCT | |
414 | #x03C0 ;; 185:GREEK SMALL LETTER PI | |
415 | #x222B ;; 186:INTEGRAL | |
416 | #x00AA ;; 187:FEMININE ORDINAL INDICATOR | |
417 | #x00BA ;; 188:MASCULINE ORDINAL INDICATOR | |
418 | #x03A9 ;; 189:GREEK CAPITAL LETTER OMEGA | |
419 | #x00E6 ;; 190:LATIN SMALL LETTER AE | |
420 | #x00F8 ;; 191:LATIN SMALL LETTER O WITH STROKE | |
421 | #x00BF ;; 192:INVERTED QUESTION MARK | |
422 | #x00A1 ;; 193:INVERTED EXCLAMATION MARK | |
423 | #x00AC ;; 194:NOT SIGN | |
424 | #x221A ;; 195:SQUARE ROOT | |
425 | #x0192 ;; 196:LATIN SMALL LETTER F WITH HOOK | |
426 | #x2248 ;; 197:ALMOST EQUAL TO | |
427 | #x2206 ;; 198:INCREMENT | |
428 | #x00AB ;; 199:LEFT-POINTING DOUBLE ANGLE QUOTATION MARK | |
429 | #x00BB ;; 200:RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK | |
430 | #x2026 ;; 201:HORIZONTAL ELLIPSIS | |
431 | #x00A0 ;; 202:NO-BREAK SPACE | |
432 | #x00C0 ;; 203:LATIN CAPITAL LETTER A WITH GRAVE | |
433 | #x00C3 ;; 204:LATIN CAPITAL LETTER A WITH TILDE | |
434 | #x00D5 ;; 205:LATIN CAPITAL LETTER O WITH TILDE | |
435 | #x0152 ;; 206:LATIN CAPITAL LIGATURE OE | |
436 | #x0153 ;; 207:LATIN SMALL LIGATURE OE | |
437 | #x2013 ;; 208:EN DASH | |
438 | #x2014 ;; 209:EM DASH | |
439 | #x201C ;; 210:LEFT DOUBLE QUOTATION MARK | |
440 | #x201D ;; 211:RIGHT DOUBLE QUOTATION MARK | |
441 | #x2018 ;; 212:LEFT SINGLE QUOTATION MARK | |
442 | #x2019 ;; 213:RIGHT SINGLE QUOTATION MARK | |
443 | #x00F7 ;; 214:DIVISION SIGN | |
444 | #x25CA ;; 215:LOZENGE | |
445 | #x00FF ;; 216:LATIN SMALL LETTER Y WITH DIAERESIS | |
446 | #x0178 ;; 217:LATIN CAPITAL LETTER Y WITH DIAERESIS | |
447 | #x2044 ;; 218:FRACTION SLASH | |
448 | #x20AC ;; 219:EURO SIGN | |
449 | #x2039 ;; 220:SINGLE LEFT-POINTING ANGLE QUOTATION MARK | |
450 | #x203A ;; 221:SINGLE RIGHT-POINTING ANGLE QUOTATION MARK | |
451 | #xFB01 ;; 222:LATIN SMALL LIGATURE FI | |
452 | #xFB02 ;; 223:LATIN SMALL LIGATURE FL | |
453 | #x2021 ;; 224:DOUBLE DAGGER | |
454 | #x00B7 ;; 225:MIDDLE DOT | |
455 | #x201A ;; 226:SINGLE LOW-9 QUOTATION MARK | |
456 | #x201E ;; 227:DOUBLE LOW-9 QUOTATION MARK | |
457 | #x2030 ;; 228:PER MILLE SIGN | |
458 | #x00C2 ;; 229:LATIN CAPITAL LETTER A WITH CIRCUMFLEX | |
459 | #x00CA ;; 230:LATIN CAPITAL LETTER E WITH CIRCUMFLEX | |
460 | #x00C1 ;; 231:LATIN CAPITAL LETTER A WITH ACUTE | |
461 | #x00CB ;; 232:LATIN CAPITAL LETTER E WITH DIAERESIS | |
462 | #x00C8 ;; 233:LATIN CAPITAL LETTER E WITH GRAVE | |
463 | #x00CD ;; 234:LATIN CAPITAL LETTER I WITH ACUTE | |
464 | #x00CE ;; 235:LATIN CAPITAL LETTER I WITH CIRCUMFLEX | |
465 | #x00CF ;; 236:LATIN CAPITAL LETTER I WITH DIAERESIS | |
466 | #x00CC ;; 237:LATIN CAPITAL LETTER I WITH GRAVE | |
467 | #x00D3 ;; 238:LATIN CAPITAL LETTER O WITH ACUTE | |
468 | #x00D4 ;; 239:LATIN CAPITAL LETTER O WITH CIRCUMFLEX | |
469 | #xF8FF ;; 240:Apple logo | |
470 | #x00D2 ;; 241:LATIN CAPITAL LETTER O WITH GRAVE | |
471 | #x00DA ;; 242:LATIN CAPITAL LETTER U WITH ACUTE | |
472 | #x00DB ;; 243:LATIN CAPITAL LETTER U WITH CIRCUMFLEX | |
473 | #x00D9 ;; 244:LATIN CAPITAL LETTER U WITH GRAVE | |
474 | #x0131 ;; 245:LATIN SMALL LETTER DOTLESS I | |
475 | #x02C6 ;; 246:MODIFIER LETTER CIRCUMFLEX ACCENT | |
476 | #x02DC ;; 247:SMALL TILDE | |
477 | #x00AF ;; 248:MACRON | |
478 | #x02D8 ;; 249:BREVE | |
479 | #x02D9 ;; 250:DOT ABOVE | |
480 | #x02DA ;; 251:RING ABOVE | |
481 | #x00B8 ;; 252:CEDILLA | |
482 | #x02DD ;; 253:DOUBLE ACUTE ACCENT | |
483 | #x02DB ;; 254:OGONEK | |
484 | #x02C7 ;; 255:CARON | |
485 | ]) | |
486 | translation-table) | |
487 | (while (< i 128) | |
488 | (aset encoding-vector i i) | |
489 | (setq i (1+ i))) | |
490 | (while (< i 256) | |
491 | (aset encoding-vector i | |
492 | (decode-char 'ucs (aref vec (- i 128)))) | |
493 | (setq i (1+ i))) | |
494 | (setq translation-table | |
495 | (make-translation-table-from-vector encoding-vector)) | |
496 | (define-translation-table 'mac-roman-decoder translation-table) | |
497 | (define-translation-table 'mac-roman-encoder | |
498 | (char-table-extra-slot translation-table 0))) | |
499 | ||
500 | (define-ccl-program decode-mac-roman | |
501 | `(4 | |
502 | ((loop | |
503 | (read r1) | |
504 | (if (r1 < 128) ;; ASCII | |
505 | (r0 = ,(charset-id 'ascii)) | |
546790cb | 506 | (if (r1 < 160) |
71070f12 KH |
507 | (r0 = ,(charset-id 'eight-bit-control)) |
508 | (r0 = ,(charset-id 'eight-bit-graphic)))) | |
509 | (translate-character mac-roman-decoder r0 r1) | |
510 | (write-multibyte-character r0 r1) | |
511 | (repeat)))) | |
512 | "CCL program to decode Mac Roman") | |
513 | ||
514 | (define-ccl-program encode-mac-roman | |
515 | `(1 | |
516 | ((loop | |
517 | (read-multibyte-character r0 r1) | |
518 | (translate-character mac-roman-encoder r0 r1) | |
519 | (write-repeat r1)))) | |
520 | "CCL program to encode Mac Roman") | |
521 | ||
522 | (make-coding-system | |
523 | 'mac-roman 4 ?M "Mac Roman Encoding" | |
524 | '(decode-mac-roman . encode-mac-roman) | |
525 | '((safe-chars . mac-roman-encoder) | |
526 | (valid-codes (0 . 255)))) | |
527 | ||
27ff18c9 DL |
528 | (provide 'european) |
529 | ||
4ed46869 | 530 | ;;; european.el ends here |