("Belarusian"): Doc fix.
[bpt/emacs.git] / lisp / language / cyrillic.el
1 ;;; cyrillic.el --- support for Cyrillic -*- coding: iso-2022-7bit; -*-
2
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
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
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 ;; 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.
30
31 ;;; Code:
32
33 ;; Cyrillic (general)
34
35 ;; ISO-8859-5 stuff
36
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)
42 :mime-charset 'iso-8859-5)
43
44 (define-coding-system-alias 'iso-8859-5 'cyrillic-iso-8bit)
45
46 (set-language-info-alist
47 "Cyrillic-ISO" '((charset iso-8859-5)
48 (coding-system cyrillic-iso-8bit)
49 (coding-priority cyrillic-iso-8bit)
50 (nonascii-translation . iso-8859-5)
51 (input-method . "cyrillic-yawerty")
52 (unibyte-display . cyrillic-iso-8bit)
53 (features cyril-util)
54 (sample-text . "Russian (\e,L@caaZXY\e(B) \e,L7T`PRabRcYbU\e(B!")
55 (documentation . "Support for Cyrillic ISO-8859-5."))
56 '("Cyrillic"))
57
58 ;; KOI-8 stuff
59
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)
68 :mime-charset 'koi8-r)
69
70 (define-coding-system-alias 'koi8-r 'cyrillic-koi8)
71 (define-coding-system-alias 'koi8 'cyrillic-koi8)
72 (define-coding-system-alias 'cp878 'cyrillic-koi8)
73
74 (set-language-info-alist
75 "Cyrillic-KOI8" `((charset koi8)
76 (coding-system cyrillic-koi8)
77 (coding-priority cyrillic-koi8)
78 (nonascii-translation . koi8)
79 (input-method . "cyrillic-jcuken")
80 (features cyril-util)
81 (unibyte-display . cyrillic-koi8)
82 (sample-text . "Russian (\e,L@caaZXY\e(B) \e,L7T`PRabRcYbU\e(B!")
83 (documentation . "Support for Cyrillic KOI8-R."))
84 '("Cyrillic"))
85
86 ;;; ALTERNATIVNYJ stuff
87
88 (define-coding-system 'cyrillic-alternativnyj
89 "ALTERNATIVNYJ 8-bit encoding for Cyrillic."
90 :coding-type 'charset
91 :mnemonic ?A
92 :charset-list '(alternativnyj)
93 :mime-charset 'cp866)
94
95 (define-coding-system-alias 'alternativnyj 'cyrillic-alternativnyj)
96 (define-coding-system-alias 'cp866 'cyrillic-alternativnyj)
97
98 (set-language-info-alist
99 "Cyrillic-ALT" `((charset alternativnyj)
100 (coding-system cyrillic-alternativnyj)
101 (coding-priority cyrillic-alternativnyj)
102 (nonascii-translation . alternativnyj)
103 (input-method . "cyrillic-jcuken")
104 (features cyril-util)
105 (unibyte-display . cyrillic-alternativnyj)
106 (sample-text . "Russian (\e,L@caaZXY\e(B) \e,L7T`PRabRcYbU\e(B!")
107 (documentation . "Support for Cyrillic ALTERNATIVNYJ."))
108 '("Cyrillic"))
109
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
118 "KOI8-T 8-bit encoding for Cyrillic"
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
133 "cp1125 8-bit encoding for Cyrillic"
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
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
149 ;; (set-language-info-alist
150 ;; "Windows-1251" `((coding-system windows-1251)
151 ;; (coding-priority windows-1251)
152 ;; (nonascii-translation
153 ;; . ,(get 'decode-windows-1252 'translation-table))
154 ;; (input-method . "russian-typewriter") ; fixme?
155 ;; (features code-pages)
156 ;; (documentation . "Support for windows-1251 character set."))
157 ;; '("Cyrillic"))
158
159 (set-language-info-alist
160 "Tajik" `((coding-system cyrillic-koi8-t)
161 (coding-priority cyrillic-koi8-t)
162 (nonascii-translation . cyrillic-koi8-t)
163 (input-method . "russian-typewriter") ; fixme?
164 (features code-pages)
165 (documentation . "Support for Tajik using KOI8-T."))
166 '("Cyrillic"))
167
168 (set-language-info-alist
169 "Bulgarian" `((coding-system windows-1251)
170 (coding-priority windows-1251)
171 (nonascii-translation . windows-1251)
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)
182 (input-method . "belarusian")
183 (features code-pages)
184 (documentation
185 . "Support for Belarusian with windows-1251 character set.
186 \(The name Belarusian replaced Byelorussian in the early 1990s.)"))
187 '("Cyrillic"))
188
189 (provide 'cyrillic)
190
191 ;;; cyrillic.el ends here