1 ;;; cyrillic.el --- support for Cyrillic -*- coding: iso-2022-7bit; -*-
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
6 ;; Keywords: multilingual, Cyrillic
8 ;; This file is part of GNU Emacs.
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)
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.
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.
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.
37 (define-coding-system 'cyrillic-iso-8bit
38 "ISO 2022 based 8-bit encoding for Cyrillic script (MIME:ISO-8859-5)."
41 :charset-list
'(iso-8859-5)
42 :mime-charset
'iso-8859-5
)
44 (define-coding-system-alias 'iso-8859-5
'cyrillic-iso-8bit
)
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
)
54 (sample-text .
"Russian (\e,L@caaZXY\e(B) \e,L7T`PRabRcYbU\e(B!")
55 (documentation .
"Support for Cyrillic ISO-8859-5."))
60 (define-coding-system 'cyrillic-koi8
61 "KOI8 8-bit encoding for Cyrillic (MIME: KOI8-R)."
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.
68 :mime-charset
'koi8-r
)
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
)
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")
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."))
86 ;;; ALTERNATIVNYJ stuff
88 (define-coding-system 'cyrillic-alternativnyj
89 "ALTERNATIVNYJ 8-bit encoding for Cyrillic."
92 :charset-list
'(alternativnyj)
95 (define-coding-system-alias 'alternativnyj
'cyrillic-alternativnyj
)
96 (define-coding-system-alias 'cp866
'cyrillic-alternativnyj
)
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."))
110 (define-coding-system 'koi8-u
111 "KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)"
112 :coding-type
'charset
114 :charset-list
'(koi8-u)
115 :mime-charset
'koi8-u
)
117 (define-coding-system 'koi8-t
118 "KOI8-T 8-bit encoding for Cyrillic"
119 :coding-type
'charset
121 :charset-list
'(koi8-t)
122 :mime-charset
'koi8-t
)
124 (define-coding-system 'windows-1251
125 "windows-1251 8-bit encoding for Cyrillic (MIME: WINDOWS-1251)"
126 :coding-type
'charset
128 :charset-list
'(windows-1251)
129 :mime-charset
'windows-1251
)
130 (define-coding-system-alias 'cp1251
'windows-1251
)
132 (define-coding-system 'cp1125
133 "cp1125 8-bit encoding for Cyrillic"
134 :coding-type
'charset
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
)
141 (define-coding-system 'cp855
142 "DOS codepage 855 (Russian)"
143 :coding-type
'charset
145 :charset-list
'(cp855)
146 :mime-charset
'cp855
)
147 (define-coding-system-alias 'ibm855
'cp855
)
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."))
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."))
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
)
175 .
"Support for Bulgrian with windows-1251 character set."))
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
)
185 .
"Support for Belarusian with windows-1251 character set.
186 \(The name Belarusian replaced Byelorussian in the early 1990s.)"))
191 ;;; cyrillic.el ends here