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