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