Commit | Line | Data |
---|---|---|
60370d40 | 1 | ;;; cyrillic.el --- support for Cyrillic -*- coding: iso-2022-7bit; -*- |
4ed46869 | 2 | |
4ed46869 | 3 | ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. |
b79e7b7b | 4 | ;; Licensed to the Free Software Foundation. |
4ed46869 KH |
5 | |
6 | ;; Keywords: multilingual, Cyrillic | |
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 | ||
445559c9 DL |
27 | ;; The character set ISO8859-5 is supported. See |
28 | ;; http://www.ecma.ch/ecma1/STAND/ECMA-113.HTM. KOI-8 and | |
29 | ;; ALTERNATIVNYJ are converted to ISO8859-5 internally. | |
4ed46869 KH |
30 | |
31 | ;;; Code: | |
32 | ||
5f1d80c7 KH |
33 | ;; Cyrillic (general) |
34 | ||
a07aa680 | 35 | ;; ISO-8859-5 stuff |
2b01336d | 36 | |
e1915ab3 KH |
37 | (define-coding-system 'cyrillic-iso-8bit |
38 | "ISO 2022 based 8-bit encoding for Cyrillic script (MIME:ISO-8859-5)." | |
39 | :coding-type 'charset | |
40 | :mnemonic ?5 | |
41 | :charset-list '(iso-8859-5) | |
30cbd69a | 42 | :mime-charset 'iso-8859-5) |
4ed46869 | 43 | |
71eabd24 | 44 | (define-coding-system-alias 'iso-8859-5 'cyrillic-iso-8bit) |
efbc7e89 | 45 | |
5f1d80c7 | 46 | (set-language-info-alist |
e1915ab3 | 47 | "Cyrillic-ISO" '((charset iso-8859-5) |
11b77f14 KH |
48 | (coding-system cyrillic-iso-8bit) |
49 | (coding-priority cyrillic-iso-8bit) | |
e1915ab3 | 50 | (nonascii-translation . iso-8859-5) |
a564ccf9 | 51 | (input-method . "cyrillic-yawerty") |
a564ccf9 KH |
52 | (unibyte-display . cyrillic-iso-8bit) |
53 | (features cyril-util) | |
5f1d80c7 | 54 | (sample-text . "Russian (\e,L@caaZXY\e(B) \e,L7T`PRabRcYbU\e(B!") |
11b77f14 KH |
55 | (documentation . "Support for Cyrillic ISO-8859-5.")) |
56 | '("Cyrillic")) | |
5f1d80c7 | 57 | |
a07aa680 | 58 | ;; KOI-8 stuff |
2b01336d | 59 | |
e1915ab3 KH |
60 | (define-coding-system 'cyrillic-koi8 |
61 | "KOI8 8-bit encoding for Cyrillic (MIME: KOI8-R)." | |
62 | :coding-type 'charset | |
63 | ;; We used to use ?K. It is true that ?K is more strictly correct, | |
64 | ;; but it is also used for Korean. So people who use koi8 for | |
65 | ;; languages other than Russian will have to forgive us. | |
66 | :mnemonic ?R | |
67 | :charset-list '(koi8) | |
30cbd69a | 68 | :mime-charset 'koi8-r) |
2b01336d | 69 | |
71eabd24 RS |
70 | (define-coding-system-alias 'koi8-r 'cyrillic-koi8) |
71 | (define-coding-system-alias 'koi8 'cyrillic-koi8) | |
30cbd69a | 72 | (define-coding-system-alias 'cp878 'cyrillic-koi8) |
2b01336d | 73 | |
5f1d80c7 | 74 | (set-language-info-alist |
e1915ab3 | 75 | "Cyrillic-KOI8" `((charset koi8) |
11b77f14 KH |
76 | (coding-system cyrillic-koi8) |
77 | (coding-priority cyrillic-koi8) | |
e1915ab3 | 78 | (nonascii-translation . koi8) |
44446f59 | 79 | (input-method . "cyrillic-jcuken") |
a564ccf9 KH |
80 | (features cyril-util) |
81 | (unibyte-display . cyrillic-koi8) | |
5f1d80c7 | 82 | (sample-text . "Russian (\e,L@caaZXY\e(B) \e,L7T`PRabRcYbU\e(B!") |
70c58a1f | 83 | (documentation . "Support for Cyrillic KOI8-R.")) |
11b77f14 | 84 | '("Cyrillic")) |
5f1d80c7 | 85 | |
a07aa680 | 86 | ;;; ALTERNATIVNYJ stuff |
2b01336d | 87 | |
e1915ab3 KH |
88 | (define-coding-system 'cyrillic-alternativnyj |
89 | "ALTERNATIVNYJ 8-bit encoding for Cyrillic." | |
90 | :coding-type 'charset | |
91 | :mnemonic ?A | |
30cbd69a DL |
92 | :charset-list '(alternativnyj) |
93 | :mime-charset 'cp866) | |
2b01336d | 94 | |
71eabd24 | 95 | (define-coding-system-alias 'alternativnyj 'cyrillic-alternativnyj) |
30cbd69a | 96 | (define-coding-system-alias 'cp866 'cyrillic-alternativnyj) |
efbc7e89 | 97 | |
4ed46869 | 98 | (set-language-info-alist |
e1915ab3 | 99 | "Cyrillic-ALT" `((charset alternativnyj) |
11b77f14 KH |
100 | (coding-system cyrillic-alternativnyj) |
101 | (coding-priority cyrillic-alternativnyj) | |
e1915ab3 | 102 | (nonascii-translation . alternativnyj) |
44446f59 | 103 | (input-method . "cyrillic-jcuken") |
a564ccf9 KH |
104 | (features cyril-util) |
105 | (unibyte-display . cyrillic-alternativnyj) | |
5f1d80c7 | 106 | (sample-text . "Russian (\e,L@caaZXY\e(B) \e,L7T`PRabRcYbU\e(B!") |
11b77f14 KH |
107 | (documentation . "Support for Cyrillic ALTERNATIVNYJ.")) |
108 | '("Cyrillic")) | |
4ed46869 | 109 | |
a07aa680 DL |
110 | (define-coding-system 'koi8-u |
111 | "KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)" | |
112 | :coding-type 'charset | |
113 | :mnemonic ?U | |
114 | :charset-list '(koi8-u) | |
115 | :mime-charset 'koi8-u) | |
116 | ||
117 | (define-coding-system 'koi8-t | |
057eca09 | 118 | "KOI8-T 8-bit encoding for Cyrillic" |
a07aa680 DL |
119 | :coding-type 'charset |
120 | :mnemonic ?* | |
121 | :charset-list '(koi8-t) | |
122 | :mime-charset 'koi8-t) | |
123 | ||
124 | (define-coding-system 'windows-1251 | |
125 | "windows-1251 8-bit encoding for Cyrillic (MIME: WINDOWS-1251)" | |
126 | :coding-type 'charset | |
127 | :mnemonic ?b | |
128 | :charset-list '(windows-1251) | |
129 | :mime-charset 'windows-1251) | |
130 | (define-coding-system-alias 'cp1251 'windows-1251) | |
131 | ||
132 | (define-coding-system 'cp1125 | |
057eca09 | 133 | "cp1125 8-bit encoding for Cyrillic" |
a07aa680 DL |
134 | :coding-type 'charset |
135 | :mnemonic ?* | |
136 | :charset-list '(cp1125)) | |
137 | (define-coding-system-alias 'ruscii 'cp1125) | |
138 | ;; Original name for cp1125, says Serhii Hlodin <hlodin@lutsk.bank.gov.ua> | |
139 | (define-coding-system-alias 'cp866u 'cp1125) | |
140 | ||
515a4f82 DL |
141 | (define-coding-system 'cp855 |
142 | "DOS codepage 855 (Russian)" | |
143 | :coding-type 'charset | |
144 | :mnemonic ?D | |
145 | :charset-list '(cp855) | |
146 | :mime-charset 'cp855) | |
147 | (define-coding-system-alias 'ibm855 'cp855) | |
148 | ||
05b99d65 DL |
149 | ;; (set-language-info-alist |
150 | ;; "Windows-1251" `((coding-system windows-1251) | |
151 | ;; (coding-priority windows-1251) | |
05b99d65 DL |
152 | ;; (input-method . "russian-typewriter") ; fixme? |
153 | ;; (features code-pages) | |
154 | ;; (documentation . "Support for windows-1251 character set.")) | |
155 | ;; '("Cyrillic")) | |
156 | ||
157 | (set-language-info-alist | |
0a3fa714 DL |
158 | "Tajik" `((coding-system koi8-t) |
159 | (coding-priority koi8-t) | |
05b99d65 | 160 | (nonascii-translation . cyrillic-koi8-t) |
0a3fa714 | 161 | (charset . koi8-t) |
05b99d65 DL |
162 | (input-method . "russian-typewriter") ; fixme? |
163 | (features code-pages) | |
164 | (documentation . "Support for Tajik using KOI8-T.")) | |
165 | '("Cyrillic")) | |
166 | ||
167 | (set-language-info-alist | |
168 | "Bulgarian" `((coding-system windows-1251) | |
169 | (coding-priority windows-1251) | |
170 | (nonascii-translation . windows-1251) | |
0a3fa714 | 171 | (charset . windows-1251) |
05b99d65 DL |
172 | (input-method . "bulgarian-standard") |
173 | (features code-pages) | |
174 | (documentation | |
175 | . "Support for Bulgrian with windows-1251 character set.")) | |
176 | '("Cyrillic")) | |
177 | ||
178 | (set-language-info-alist | |
179 | "Belarusian" `((coding-system windows-1251) | |
180 | (coding-priority windows-1251) | |
181 | (nonascii-translation . windows-1251) | |
0a3fa714 | 182 | (charset . windows-1251) |
05b99d65 DL |
183 | (input-method . "belarusian") |
184 | (features code-pages) | |
185 | (documentation | |
186 | . "Support for Belarusian with windows-1251 character set. | |
057eca09 | 187 | \(The name Belarusian replaced Byelorussian in the early 1990s.)")) |
05b99d65 DL |
188 | '("Cyrillic")) |
189 | ||
0a3fa714 DL |
190 | (set-language-info-alist |
191 | "Ukrainian" `((coding-system koi8-u) | |
192 | (coding-priority koi8-u) | |
193 | (input-method . "ukrainian-computer") | |
194 | (documentation | |
195 | . "Support for Ukrainian with koi8-u character set.")) | |
196 | '("Cyrillic")) | |
197 | ||
41da80b1 DL |
198 | (provide 'cyrillic) |
199 | ||
4ed46869 | 200 | ;;; cyrillic.el ends here |