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