1 ;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*-
3 ;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7 ;; Keywords: multilingual, European
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
28 ;; For European scripts, character sets ISO8859-1,2,3,4,9,14,15 are
33 ;; Latin-1 (ISO-8859-1)
35 (set-language-info-alist
36 "Latin-1" '((charset ascii latin-iso8859-1)
37 (coding-system iso-latin-1)
38 (coding-priority iso-latin-1)
39 (nonascii-translation . latin-iso8859-1)
40 (unibyte-syntax . "latin-1")
41 (unibyte-display . iso-latin-1)
42 (input-method . "latin-1-prefix")
44 . "Hello, Hej, Tere, Hei, Bonjour, Gr
\e,A|_
\e(B Gott, Ciao,
\e,A!
\e(BHola!")
46 This language environment is a generic one for the Latin-1 (ISO-8859-1)
47 character set which supports the following European languages:
48 Albanian, Basque, Breton, Catalan, Danish, Dutch, English, Faeroese,
49 Finnish, French (with restrictions -- see Latin-9), Frisian, Galician,
50 German, Greenlandic, Icelandic, Irish Gaelic (new orthography),
51 Italian, Latin, Luxemburgish, Norwegian, Portuguese, Rhaeto-Romanic,
52 Scottish Gaelic, Spanish, and Swedish.
53 We also have specific language environments for the following languages:
55 For German, \"German\".
56 For French, \"French\".
57 For Italian, \"Italian\".
58 For Slovenian, \"Slovenian\".
59 For Spanish, \"Spanish\".
61 Latin-1 also covers several written languages outside Europe, including
62 Indonesian/Malay, Tagalog (Philippines), Swahili and Afrikaans."))
66 ;; Latin-2 (ISO-8859-2)
70 "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)."
71 '(ascii latin-iso8859-2 nil nil
72 nil nil nil nil nil nil nil nil nil nil nil t)
73 '((safe-charsets ascii latin-iso8859-2)
74 (mime-charset . iso-8859-2)))
76 (define-coding-system-alias 'iso-8859-2 'iso-latin-2)
77 (define-coding-system-alias 'latin-2 'iso-latin-2)
79 (set-language-info-alist
80 "Latin-2" '((charset ascii latin-iso8859-2)
81 (coding-system iso-latin-2)
82 (coding-priority iso-latin-2)
83 (nonascii-translation . latin-iso8859-2)
84 (unibyte-syntax . "latin-2")
85 (unibyte-display . iso-latin-2)
86 (input-method . "latin-2-prefix")
88 This language environment is a generic one for the Latin-2 (ISO-8859-2)
89 character set which supports the following languages:
90 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
91 Serbo-Croatian or Croatian, Slovak, Slovene, Sorbian (upper and lower),
93 We also have specific language environments for the following languages:
95 For Croatian, \"Croatian\".
96 For Romanian, \"Romanian\".
97 For Slovak, \"Slovak\"."))
101 ;; Latin-3 (ISO-8859-3)
105 "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)."
106 '(ascii latin-iso8859-3 nil nil
107 nil nil nil nil nil nil nil nil nil nil nil t)
108 '((safe-charsets ascii latin-iso8859-3)
109 (mime-charset . iso-8859-3)))
111 (define-coding-system-alias 'iso-8859-3 'iso-latin-3)
112 (define-coding-system-alias 'latin-3 'iso-latin-3)
114 (set-language-info-alist
115 "Latin-3" '((charset ascii latin-iso8859-3)
116 (coding-system iso-latin-3)
117 (coding-priority iso-latin-3)
118 (nonascii-translation . latin-iso8859-3)
119 (unibyte-syntax . "latin-3")
120 (unibyte-display . iso-latin-3)
121 (input-method . "latin-3-prefix")
123 These languages are supported with the Latin-3 (ISO-8859-3) character set:
124 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician,
125 German, Italian, Maltese, Spanish, and Turkish."))
129 ;; Latin-4 (ISO-8859-4)
133 "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)."
134 '(ascii latin-iso8859-4 nil nil
135 nil nil nil nil nil nil nil nil nil nil nil t)
136 '((safe-charsets ascii latin-iso8859-4)
137 (mime-charset . iso-8859-4)))
139 (define-coding-system-alias 'iso-8859-4 'iso-latin-4)
140 (define-coding-system-alias 'latin-4 'iso-latin-4)
142 (set-language-info-alist
143 "Latin-4" '((charset ascii latin-iso8859-4)
144 (coding-system iso-8859-4)
145 (coding-priority iso-8859-4)
146 (nonascii-translation . latin-iso8859-4)
147 (unibyte-syntax . "latin-4")
148 (unibyte-display . iso-8859-4)
149 (input-method . "latin-4-postfix")
151 These languages are supported with the Latin-4 (ISO-8859-4) character set:
152 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish,
153 Latvian, Lithuanian, and Norwegian."))
157 ;; Latin-5 (ISO-8859-9)
161 "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)."
162 '(ascii latin-iso8859-9 nil nil
163 nil nil nil nil nil nil nil nil nil nil nil t)
164 '((safe-charsets ascii latin-iso8859-9)
165 (mime-charset . iso-8859-9)))
167 (define-coding-system-alias 'iso-8859-9 'iso-latin-5)
168 (define-coding-system-alias 'latin-5 'iso-latin-5)
170 (set-language-info-alist
171 "Latin-5" '((charset ascii latin-iso8859-9)
172 (coding-system iso-latin-5)
173 (coding-priority iso-latin-5)
174 (nonascii-translation . latin-iso8859-9)
175 (unibyte-syntax . "latin-5")
176 (unibyte-display . iso-latin-5)
177 (input-method . "latin-5-postfix")
178 (documentation . "Support for Turkish language."))
182 ;; Latin-8 (ISO-8859-14)
185 'iso-latin-8 2 ?W ; `W' for `Welsh', since `C'
186 ; for `Celtic' is taken.
187 "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)."
188 '(ascii latin-iso8859-14 nil nil
189 nil nil nil nil nil nil nil nil nil nil nil t t)
190 '((safe-charsets ascii latin-iso8859-14)
191 (mime-charset . iso-8859-14)))
193 (define-coding-system-alias 'iso-8859-14 'iso-latin-8)
194 (define-coding-system-alias 'latin-8 'iso-latin-8)
196 (set-language-info-alist
197 "Latin-8" '((charset ascii latin-iso8859-14)
198 (coding-system iso-latin-8)
199 (coding-priority iso-latin-8)
200 (nonascii-translation . latin-iso8859-14)
201 (unibyte-syntax . "latin-8")
202 (unibyte-display . iso-latin-8)
203 (input-method . "latin-8-prefix")
204 ;; Fixme: Welsh/Ga{e}lic greetings
205 (sample-text . "
\e,_"
\e(B
\e,_p
\e(B
\e,_^
\e(B")
207 This language environment is a generic one for the Latin-8 (ISO-8859-14)
208 character set which supports the Celtic languages, including those not
209 covered by other ISO-8859 character sets:
210 Welsh, Manx Gaelic and Irish Gaelic (old orthography)."))
213 ;; Latin-9 (ISO-8859-15)
216 'iso-latin-9 2 ?0 ; `0' for `Latin-0'
217 "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)."
218 '(ascii latin-iso8859-15 nil nil
219 nil nil nil nil nil nil nil nil nil nil nil t t)
220 '((safe-charsets ascii latin-iso8859-15)
221 (mime-charset . iso-8859-15)))
223 (define-coding-system-alias 'iso-8859-15 'iso-latin-9)
224 (define-coding-system-alias 'latin-9 'iso-latin-9)
225 (define-coding-system-alias 'latin-0 'iso-latin-9)
227 (set-language-info-alist
228 "Latin-9" '((charset ascii latin-iso8859-15)
229 (coding-system iso-latin-9)
230 (coding-priority iso-latin-9)
231 (nonascii-translation . latin-iso8859-15)
232 (unibyte-syntax . "latin-9")
233 (unibyte-display . iso-latin-9)
234 (input-method . "latin-9-prefix")
236 . "AVE.
\e,b&(48<=>
\e(B
\e,b$
\e(B")
238 This language environment is a generic one for the Latin-9 (ISO-8859-15)
239 character set which supports the same languages as Latin-1 with the
240 addition of the Euro sign and some additional French and Finnish letters.
241 Latin-9 is sometimes nicknamed `Latin-0'."))
244 (set-language-info-alist
245 "Dutch" '((tutorial . "TUTORIAL.nl")
246 (charset ascii latin-iso8859-1)
247 (coding-system iso-latin-1 iso-latin-9)
248 (coding-priority iso-latin-1)
249 (nonascii-translation . latin-iso8859-1)
250 (unibyte-syntax . "latin-1")
251 (unibyte-display . iso-latin-1)
252 (input-method . "dutch")
253 (sample-text . "Er is een aantal manieren waarop je dit kan doen")
255 This language environment is almost the same as Latin-1,
256 but it selects the Dutch tutorial and input method."))
259 (set-language-info-alist
260 "German" '((tutorial . "TUTORIAL.de")
261 (charset ascii latin-iso8859-1)
262 (coding-system iso-latin-1 iso-latin-9)
263 (coding-priority iso-latin-1)
264 (input-method . "german-postfix")
265 (nonascii-translation . latin-iso8859-1)
266 (unibyte-syntax . "latin-1")
267 (unibyte-display . iso-latin-1)
269 German (Deutsch Nord) Guten Tag
270 German (Deutsch S
\e,A|
\e(Bd) Gr
\e,A|_
\e(B Gott")
272 This language environment is almost the same as Latin-1,
273 but sets the default input method to \"german-postfix\".
274 Additionally, it selects the German tutorial."))
277 (set-language-info-alist
278 "French" '((tutorial . "TUTORIAL.fr")
279 (charset ascii latin-iso8859-1)
280 (coding-system iso-latin-1 iso-latin-9)
281 (coding-priority iso-latin-1)
282 (nonascii-translation . latin-iso8859-1)
283 (unibyte-syntax . "latin-1")
284 (unibyte-display . iso-latin-1)
285 (input-method . "latin-1-prefix")
286 (sample-text . "French (Fran
\e,Ag
\e(Bais) Bonjour, Salut")
288 This language environment is almost the same as Latin-1,
289 but it selects the French tutorial and input method."))
292 (set-language-info-alist
293 "Italian" '((tutorial . "TUTORIAL.it")
294 (charset ascii latin-iso8859-1)
295 (coding-system iso-latin-1 iso-latin-9)
296 (coding-priority iso-latin-1)
297 (nonascii-translation . latin-iso8859-1)
298 (unibyte-syntax . "latin-1")
299 (unibyte-display . iso-latin-1)
300 (input-method . "italian-postfix")
301 (sample-text . "Salve, ciao!")
303 This language environment is almost the same as Latin-1,
304 but sets the default input method to \"italian-postfix\".
305 Additionally, it selects the Italian tutorial."))
308 (set-language-info-alist
309 "Slovenian" '((charset . (ascii latin-iso8859-2))
310 (coding-system . (iso-8859-2))
311 (coding-priority . (iso-8859-2))
312 (nonascii-translation . latin-iso8859-2)
313 (input-method . "slovenian")
314 (unibyte-syntax . "latin-2")
315 (unibyte-display . iso-8859-2)
316 (tutorial . "TUTORIAL.sl")
317 (sample-text . "
\e,B.
\e(Belimo vam uspe
\e,B9
\e(Ben dan!")
319 This language environment is almost the same as Latin-2,
320 but it selects the Slovenian tutorial and input method."))
323 (set-language-info-alist
324 "Spanish" '((tutorial . "TUTORIAL.es")
325 (charset ascii latin-iso8859-1)
326 (coding-system iso-latin-1 iso-latin-9)
327 (coding-priority iso-latin-1)
328 (input-method . "spanish-postfix")
329 (nonascii-translation . latin-iso8859-1)
330 (unibyte-syntax . "latin-1")
331 (unibyte-display . iso-latin-1)
332 (sample-text . "Spanish (Espa
\e,Aq
\e(Bol)
\e,A!
\e(BHola!")
334 This language environment is almost the same as Latin-1,
335 but it sets the default input method to \"spanish-postfix\",
336 and it selects the Spanish tutorial."))
339 ;; For Turkish, the character set ISO-8859-9 (Latin-5) is used. But,
340 ;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3)
341 ;; was used for Turkish. Those who use Latin-3 for Turkish should use
342 ;; "Latin-3" language environment.
344 (set-language-info-alist
345 "Turkish" '((charset ascii latin-iso8859-9)
346 (coding-system iso-latin-5 iso-latin-3)
347 (coding-priority iso-latin-5)
348 (nonascii-translation . latin-iso8859-9)
349 (unibyte-syntax . "latin-5")
350 (unibyte-display . iso-latin-5)
351 (input-method . "turkish-postfix")
352 (sample-text . "Turkish (T
\e,M|
\e(Brk
\e,Mg
\e(Be) Merhaba")
353 (documentation . t)))
355 ;; Polish ISO 8859-2 environment.
356 ;; Maintainer: Wlodek Bzyl <matwb@univ.gda.pl>
357 ;; Keywords: multilingual, Polish
359 (set-language-info-alist
360 "Polish" '((charset . (ascii latin-iso8859-2))
361 (coding-system . (iso-8859-2))
362 (coding-priority . (iso-8859-2))
363 (input-method . "polish-slash")
364 (nonascii-translation . latin-iso8859-2)
365 (unibyte-syntax . "latin-2")
366 (unibyte-display . iso-8859-2)
367 (tutorial . "TUTORIAL.pl")
368 (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")
372 (set-language-info-alist
373 "Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based
374 (coding-priority utf-8 latin-8)
375 (nonascii-translation . latin-iso8859-14)
376 (input-method . "welsh")
377 (documentation . "Support for Welsh, using Unicode."))
380 (set-language-info-alist
381 "Latin-6" `((coding-system latin-6)
382 (coding-priority latin-6)
383 (nonascii-translation . ,(get 'decode-iso-latin-6 'translation-table))
384 (input-method . latin-pre)
385 (input-method . latin-pre)
386 (features code-pages)
387 (documentation . "Support for Latin-6."))
390 (set-language-info-alist
391 "Latin-7" `((coding-system latin-7)
392 (coding-priority latin-7)
393 (nonascii-translation . ,(get 'decode-iso-latin-7
395 (input-method . latin-pre)
396 (features code-pages)
397 (documentation . "Support for Latin-7, e.g. Latvian, Lithuanian."))
400 (set-language-info-alist
401 "Lithuanian" `((coding-system latin-7)
402 (coding-priority latin-7)
403 (input-method . "lithuanian-keyboard")
404 (nonascii-translation . ,(get 'decode-iso-latin-7
406 (features code-pages)
407 (documentation . "Support for Lithuanian."))
410 (set-language-info-alist
411 "Latvian" `((coding-system latin-7)
412 (coding-priority latin-7)
413 (input-method . "latvian-keyboard")
414 (nonascii-translation . ,(get 'decode-iso-latin-7
416 (features code-pages)
417 (documentation . "Support for Latvian."))
420 (set-language-info-alist
421 "Swedish" '((tutorial . "TUTORIAL.sv")
422 (charset ascii latin-iso8859-1)
423 (coding-system iso-latin-1)
424 (coding-priority iso-latin-1)
425 (nonascii-translation . latin-iso8859-1)
426 (unibyte-syntax . "latin-1")
427 (unibyte-display . iso-latin-1)
428 (sample-text . "Goddag Hej")
429 (documentation . "Support for Swedish"))
432 (set-language-info-alist
433 "Croatian" '((charset . (ascii latin-iso8859-2))
434 (coding-system . (iso-8859-2))
435 (coding-priority . (iso-8859-2))
436 (input-method . "croatian")
437 (nonascii-translation . latin-iso8859-2)
438 (unibyte-syntax . "latin-2")
439 (unibyte-display . iso-8859-2)
440 (documentation . "Support for Croatian with Latin-2 encoding."))
443 ;; Definitions for the Mac Roman character sets and coding system.
444 ;; The Mac Roman encoding uses all 128 code points in the range 128 to
445 ;; 255 for actual characters. Emacs decodes them to one of the
446 ;; following character sets.
447 ;; ascii, latin-iso8859-1, mule-unicode-0100-24ff,
448 ;; mule-unicode-2500-33ff, mule-unicode-e000-ffff
451 ((encoding-vector (make-vector 256 nil))
453 (vec ;; mac-roman (128..255) -> UCS mapping
454 [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS
455 #x00C5 ;; 129:LATIN CAPITAL LETTER A WITH RING ABOVE
456 #x00C7 ;; 130:LATIN CAPITAL LETTER C WITH CEDILLA
457 #x00C9 ;; 131:LATIN CAPITAL LETTER E WITH ACUTE
458 #x00D1 ;; 132:LATIN CAPITAL LETTER N WITH TILDE
459 #x00D6 ;; 133:LATIN CAPITAL LETTER O WITH DIAERESIS
460 #x00DC ;; 134:LATIN CAPITAL LETTER U WITH DIAERESIS
461 #x00E1 ;; 135:LATIN SMALL LETTER A WITH ACUTE
462 #x00E0 ;; 136:LATIN SMALL LETTER A WITH GRAVE
463 #x00E2 ;; 137:LATIN SMALL LETTER A WITH CIRCUMFLEX
464 #x00E4 ;; 138:LATIN SMALL LETTER A WITH DIAERESIS
465 #x00E3 ;; 139:LATIN SMALL LETTER A WITH TILDE
466 #x00E5 ;; 140:LATIN SMALL LETTER A WITH RING ABOVE
467 #x00E7 ;; 141:LATIN SMALL LETTER C WITH CEDILLA
468 #x00E9 ;; 142:LATIN SMALL LETTER E WITH ACUTE
469 #x00E8 ;; 143:LATIN SMALL LETTER E WITH GRAVE
470 #x00EA ;; 144:LATIN SMALL LETTER E WITH CIRCUMFLEX
471 #x00EB ;; 145:LATIN SMALL LETTER E WITH DIAERESIS
472 #x00ED ;; 146:LATIN SMALL LETTER I WITH ACUTE
473 #x00EC ;; 147:LATIN SMALL LETTER I WITH GRAVE
474 #x00EE ;; 148:LATIN SMALL LETTER I WITH CIRCUMFLEX
475 #x00EF ;; 149:LATIN SMALL LETTER I WITH DIAERESIS
476 #x00F1 ;; 150:LATIN SMALL LETTER N WITH TILDE
477 #x00F3 ;; 151:LATIN SMALL LETTER O WITH ACUTE
478 #x00F2 ;; 152:LATIN SMALL LETTER O WITH GRAVE
479 #x00F4 ;; 153:LATIN SMALL LETTER O WITH CIRCUMFLEX
480 #x00F6 ;; 154:LATIN SMALL LETTER O WITH DIAERESIS
481 #x00F5 ;; 155:LATIN SMALL LETTER O WITH TILDE
482 #x00FA ;; 156:LATIN SMALL LETTER U WITH ACUTE
483 #x00F9 ;; 157:LATIN SMALL LETTER U WITH GRAVE
484 #x00FB ;; 158:LATIN SMALL LETTER U WITH CIRCUMFLEX
485 #x00FC ;; 159:LATIN SMALL LETTER U WITH DIAERESIS
487 #x00B0 ;; 161:DEGREE SIGN
488 #x00A2 ;; 162:CENT SIGN
489 #x00A3 ;; 163:POUND SIGN
490 #x00A7 ;; 164:SECTION SIGN
492 #x00B6 ;; 166:PILCROW SIGN
493 #x00DF ;; 167:LATIN SMALL LETTER SHARP S
494 #x00AE ;; 168:REGISTERED SIGN
495 #x00A9 ;; 169:COPYRIGHT SIGN
496 #x2122 ;; 170:TRADE MARK SIGN
497 #x00B4 ;; 171:ACUTE ACCENT
498 #x00A8 ;; 172:DIAERESIS
499 #x2260 ;; 173:NOT EQUAL TO
500 #x00C6 ;; 174:LATIN CAPITAL LETTER AE
501 #x00D8 ;; 175:LATIN CAPITAL LETTER O WITH STROKE
502 #x221E ;; 176:INFINITY
503 #x00B1 ;; 177:PLUS-MINUS SIGN
504 #x2264 ;; 178:LESS-THAN OR EQUAL TO
505 #x2265 ;; 179:GREATER-THAN OR EQUAL TO
506 #x00A5 ;; 180:YEN SIGN
507 #x00B5 ;; 181:MICRO SIGN
508 #x2202 ;; 182:PARTIAL DIFFERENTIAL
509 #x2211 ;; 183:N-ARY SUMMATION
510 #x220F ;; 184:N-ARY PRODUCT
511 #x03C0 ;; 185:GREEK SMALL LETTER PI
512 #x222B ;; 186:INTEGRAL
513 #x00AA ;; 187:FEMININE ORDINAL INDICATOR
514 #x00BA ;; 188:MASCULINE ORDINAL INDICATOR
515 #x03A9 ;; 189:GREEK CAPITAL LETTER OMEGA
516 #x00E6 ;; 190:LATIN SMALL LETTER AE
517 #x00F8 ;; 191:LATIN SMALL LETTER O WITH STROKE
518 #x00BF ;; 192:INVERTED QUESTION MARK
519 #x00A1 ;; 193:INVERTED EXCLAMATION MARK
520 #x00AC ;; 194:NOT SIGN
521 #x221A ;; 195:SQUARE ROOT
522 #x0192 ;; 196:LATIN SMALL LETTER F WITH HOOK
523 #x2248 ;; 197:ALMOST EQUAL TO
524 #x2206 ;; 198:INCREMENT
525 #x00AB ;; 199:LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
526 #x00BB ;; 200:RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
527 #x2026 ;; 201:HORIZONTAL ELLIPSIS
528 #x00A0 ;; 202:NO-BREAK SPACE
529 #x00C0 ;; 203:LATIN CAPITAL LETTER A WITH GRAVE
530 #x00C3 ;; 204:LATIN CAPITAL LETTER A WITH TILDE
531 #x00D5 ;; 205:LATIN CAPITAL LETTER O WITH TILDE
532 #x0152 ;; 206:LATIN CAPITAL LIGATURE OE
533 #x0153 ;; 207:LATIN SMALL LIGATURE OE
534 #x2013 ;; 208:EN DASH
535 #x2014 ;; 209:EM DASH
536 #x201C ;; 210:LEFT DOUBLE QUOTATION MARK
537 #x201D ;; 211:RIGHT DOUBLE QUOTATION MARK
538 #x2018 ;; 212:LEFT SINGLE QUOTATION MARK
539 #x2019 ;; 213:RIGHT SINGLE QUOTATION MARK
540 #x00F7 ;; 214:DIVISION SIGN
541 #x25CA ;; 215:LOZENGE
542 #x00FF ;; 216:LATIN SMALL LETTER Y WITH DIAERESIS
543 #x0178 ;; 217:LATIN CAPITAL LETTER Y WITH DIAERESIS
544 #x2044 ;; 218:FRACTION SLASH
545 #x20AC ;; 219:EURO SIGN
546 #x2039 ;; 220:SINGLE LEFT-POINTING ANGLE QUOTATION MARK
547 #x203A ;; 221:SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
548 #xFB01 ;; 222:LATIN SMALL LIGATURE FI
549 #xFB02 ;; 223:LATIN SMALL LIGATURE FL
550 #x2021 ;; 224:DOUBLE DAGGER
551 #x00B7 ;; 225:MIDDLE DOT
552 #x201A ;; 226:SINGLE LOW-9 QUOTATION MARK
553 #x201E ;; 227:DOUBLE LOW-9 QUOTATION MARK
554 #x2030 ;; 228:PER MILLE SIGN
555 #x00C2 ;; 229:LATIN CAPITAL LETTER A WITH CIRCUMFLEX
556 #x00CA ;; 230:LATIN CAPITAL LETTER E WITH CIRCUMFLEX
557 #x00C1 ;; 231:LATIN CAPITAL LETTER A WITH ACUTE
558 #x00CB ;; 232:LATIN CAPITAL LETTER E WITH DIAERESIS
559 #x00C8 ;; 233:LATIN CAPITAL LETTER E WITH GRAVE
560 #x00CD ;; 234:LATIN CAPITAL LETTER I WITH ACUTE
561 #x00CE ;; 235:LATIN CAPITAL LETTER I WITH CIRCUMFLEX
562 #x00CF ;; 236:LATIN CAPITAL LETTER I WITH DIAERESIS
563 #x00CC ;; 237:LATIN CAPITAL LETTER I WITH GRAVE
564 #x00D3 ;; 238:LATIN CAPITAL LETTER O WITH ACUTE
565 #x00D4 ;; 239:LATIN CAPITAL LETTER O WITH CIRCUMFLEX
566 #xF8FF ;; 240:Apple logo
567 #x00D2 ;; 241:LATIN CAPITAL LETTER O WITH GRAVE
568 #x00DA ;; 242:LATIN CAPITAL LETTER U WITH ACUTE
569 #x00DB ;; 243:LATIN CAPITAL LETTER U WITH CIRCUMFLEX
570 #x00D9 ;; 244:LATIN CAPITAL LETTER U WITH GRAVE
571 #x0131 ;; 245:LATIN SMALL LETTER DOTLESS I
572 #x02C6 ;; 246:MODIFIER LETTER CIRCUMFLEX ACCENT
573 #x02DC ;; 247:SMALL TILDE
576 #x02D9 ;; 250:DOT ABOVE
577 #x02DA ;; 251:RING ABOVE
578 #x00B8 ;; 252:CEDILLA
579 #x02DD ;; 253:DOUBLE ACUTE ACCENT
585 (aset encoding-vector i i)
588 (aset encoding-vector i
589 (decode-char 'ucs (aref vec (- i 128))))
591 (setq translation-table
592 (make-translation-table-from-vector encoding-vector))
593 (define-translation-table 'mac-roman-decoder translation-table)
594 (define-translation-table 'mac-roman-encoder
595 (char-table-extra-slot translation-table 0)))
597 (define-ccl-program decode-mac-roman
601 (if (r1 < 128) ;; ASCII
602 (r0 = ,(charset-id 'ascii))
604 (r0 = ,(charset-id 'eight-bit-control))
605 (r0 = ,(charset-id 'eight-bit-graphic))))
606 (translate-character mac-roman-decoder r0 r1)
607 (write-multibyte-character r0 r1)
609 "CCL program to decode Mac Roman")
611 (define-ccl-program encode-mac-roman
614 (read-multibyte-character r0 r1)
615 (translate-character ucs-mule-to-mule-unicode r0 r1)
616 (translate-character mac-roman-encoder r0 r1)
617 (if (r0 != ,(charset-id 'ascii))
618 (if (r0 != ,(charset-id 'eight-bit-graphic))
619 (if (r0 != ,(charset-id 'eight-bit-control))
622 "CCL program to encode Mac Roman")
626 "Mac Roman Encoding (MIME:MACINTOSH)."
627 '(decode-mac-roman . encode-mac-roman)
628 (list (cons 'safe-chars (get 'mac-roman-encoder 'translation-table))
629 '(valid-codes (0 . 255))
630 '(mime-charset . macintosh))) ; per IANA, rfc1345
632 (defconst diacritic-composition-pattern "\\C^\\c^+")
634 (defun diacritic-compose-region (beg end)
635 "Compose diacritic characters in the region.
636 When called from a program, expects two arguments,
637 positions (integers or markers) specifying the region."
640 (narrow-to-region beg end)
641 (goto-char (point-min))
642 (while (re-search-forward diacritic-composition-pattern nil t)
643 (compose-region (match-beginning 0) (match-end 0)))))
645 (defun diacritic-compose-string (string)
646 "Compose diacritic characters in STRING and return the resulting string."
648 (while (setq idx (string-match diacritic-composition-pattern string idx))
649 (compose-string string idx (match-end 0))
650 (setq idx (match-end 0))))
653 (defun diacritic-compose-buffer ()
654 "Compose diacritic characters in the current buffer."
656 (diacritic-compose-region (point-min) (point-max)))
658 (defun diacritic-post-read-conversion (len)
659 (diacritic-compose-region (point) (+ (point) len))
662 (defun diacritic-composition-function (from to pattern &optional string)
663 "Compose diacritic text in the region FROM and TO.
664 The text matches the regular expression PATTERN.
665 Optional 4th argument STRING, if non-nil, is a string containing text
668 The return value is the number of composed characters."
669 (when (< (1+ from) to)
671 (compose-string string from to)
672 (compose-region from to))
675 ;; Register a function to compose Unicode diacrtics and marks.
676 (let ((patterns '(("\\C^\\c^+" . diacritic-composition-function))))
679 (aset composition-function-table (decode-char 'ucs c) patterns)
683 (aset composition-function-table (decode-char 'ucs c) patterns)
688 ;;; european.el ends here