| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
(make-coding-system |
|---|
| 61 |
'cyrillic-iso-8bit 2 ?5 |
|---|
| 62 |
"ISO 2022 based 8-bit encoding for Cyrillic script (MIME:ISO-8859-5)." |
|---|
| 63 |
'(ascii cyrillic-iso8859-5 nil nil |
|---|
| 64 |
nil nil nil nil nil nil nil nil nil nil nil t) |
|---|
| 65 |
'((safe-charsets ascii cyrillic-iso8859-5) |
|---|
| 66 |
(mime-charset . iso-8859-5))) |
|---|
| 67 |
|
|---|
| 68 |
(define-coding-system-alias 'iso-8859-5 'cyrillic-iso-8bit) |
|---|
| 69 |
|
|---|
| 70 |
(set-language-info-alist |
|---|
| 71 |
"Cyrillic-ISO" '((charset cyrillic-iso8859-5) |
|---|
| 72 |
(coding-system cyrillic-iso-8bit) |
|---|
| 73 |
(coding-priority cyrillic-iso-8bit) |
|---|
| 74 |
(input-method . "cyrillic-yawerty") |
|---|
| 75 |
(nonascii-translation . cyrillic-iso8859-5) |
|---|
| 76 |
(unibyte-display . cyrillic-iso-8bit) |
|---|
| 77 |
(features cyril-util) |
|---|
| 78 |
(sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") |
|---|
| 79 |
(documentation . "Support for Cyrillic ISO-8859-5.")) |
|---|
| 80 |
'("Cyrillic")) |
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
(defvar cyrillic-koi8-r-decode-table |
|---|
| 88 |
[ |
|---|
| 89 |
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|---|
| 90 |
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|---|
| 91 |
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|---|
| 92 |
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|---|
| 93 |
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|---|
| 94 |
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|---|
| 95 |
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|---|
| 96 |
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|---|
| 97 |
|
|---|
| 98 |
?$,2 (B ?$,2 "(B ?$,2 ,(B ?$,2 0(B ?$,2 4(B ?$,2 8(B ?$,2 <(B ?$,2 D(B ?$,2 L(B ?$,2 T(B ?$,2 \(B ?$,2!@(B ?$,2!D(B ?$,2!H(B ?$,2!L(B ?$,2!P(B |
|---|
| 99 |
(B ?$,1x:(B ?$,1xh(B ?$,1y$(B ?$,1y%(B ?,L (B ?$,1{!(B ?,A0(B ?,A2(B ?,A7(B ?,Aw(B |
|---|
| 100 |
?$,2 p(B ?$,2 q(B ?$,2 r(B ?,Lq(B ?$,2 s(B ?$,2 t(B ?$,2 u(B ?$,2 v(B ?$,2 w(B ?$,2 x(B ?$,2 y(B ?$,2 z(B ?$,2 {(B ?$,2 |(B ?$,2 }(B ?$,2 ~(B |
|---|
| 101 |
?$,2 (B ?$,2! (B ?$,2!!(B ?,L!(B ?$,2!"(B ?$,2!#(B ?$,2!$(B ?$,2!%(B ?$,2!&(B ?$,2!'(B ?$,2!((B ?$,2!)(B ?$,2!*(B ?$,2!+(B ?$,2!,(B ?,A)(B |
|---|
| 102 |
?,Ln(B ?,LP(B ?,LQ(B ?,Lf(B ?,LT(B ?,LU(B ?,Ld(B ?,LS(B ?,Le(B ?,LX(B ?,LY(B ?,LZ(B ?,L[(B ?,L\(B ?,L](B ?,L^(B |
|---|
| 103 |
?,L_(B ?,Lo(B ?,L`(B ?,La(B ?,Lb(B ?,Lc(B ?,LV(B ?,LR(B ?,Ll(B ?,Lk(B ?,LW(B ?,Lh(B ?,Lm(B ?,Li(B ?,Lg(B ?,Lj(B |
|---|
| 104 |
?,LN(B ?,L0(B ?,L1(B ?,LF(B ?,L4(B ?,L5(B ?,LD(B ?,L3(B ?,LE(B ?,L8(B ?,L9(B ?,L:(B ?,L;(B ?,L<(B ?,L=(B ?,L>(B |
|---|
| 105 |
?,L?(B ?,LO(B ?,L@(B ?,LA(B ?,LB(B ?,LC(B ?,L6(B ?,L2(B ?,LL(B ?,LK(B ?,L7(B ?,LH(B ?,LM(B ?,LI(B ?,LG(B ?,LJ(B |
|---|
| 106 |
;; All Unicode: |
|---|
| 107 |
;; ?$,2 (B ?$,2 "(B ?$,2 ,(B ?$,2 0(B ?$,2 4(B ?$,2 8(B ?$,2 <(B ?$,2 D(B ?$,2 L(B ?$,2 T(B ?$,2 \(B ?$,2!@(B ?$,2!D(B ?$,2!H(B ?$,2!L(B ?$,2!P(B |
|---|
| 108 |
|
|---|
| 109 |
|
|---|
| 110 |
|
|---|
| 111 |
|
|---|
| 112 |
|
|---|
| 113 |
|
|---|
| 114 |
|
|---|
| 115 |
] |
|---|
| 116 |
"Cyrillic KOI8-R decoding table.") |
|---|
| 117 |
|
|---|
| 118 |
(let ((table (make-translation-table-from-vector |
|---|
| 119 |
cyrillic-koi8-r-decode-table))) |
|---|
| 120 |
(define-translation-table 'cyrillic-koi8-r-nonascii-translation-table table) |
|---|
| 121 |
(define-translation-table 'cyrillic-koi8-r-encode-table |
|---|
| 122 |
(char-table-extra-slot table 0))) |
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 |
(makunbound 'cyrillic-koi8-r-decode-table) |
|---|
| 127 |
|
|---|
| 128 |
(define-ccl-program ccl-decode-koi8 |
|---|
| 129 |
`(4 |
|---|
| 130 |
((loop |
|---|
| 131 |
(r0 = 0) |
|---|
| 132 |
(read r1) |
|---|
| 133 |
(if (r1 < 128) |
|---|
| 134 |
(write-repeat r1) |
|---|
| 135 |
((translate-character cyrillic-koi8-r-nonascii-translation-table r0 r1) |
|---|
| 136 |
(translate-character ucs-translation-table-for-decode r0 r1) |
|---|
| 137 |
(write-multibyte-character r0 r1) |
|---|
| 138 |
(repeat)))))) |
|---|
| 139 |
"CCL program to decode KOI8-R.") |
|---|
| 140 |
|
|---|
| 141 |
(define-ccl-program ccl-encode-koi8 |
|---|
| 142 |
`(1 |
|---|
| 143 |
((loop |
|---|
| 144 |
(read-multibyte-character r0 r1) |
|---|
| 145 |
(translate-character cyrillic-koi8-r-encode-table r0 r1) |
|---|
| 146 |
(if (r0 != ,(charset-id 'ascii)) |
|---|
| 147 |
(if (r0 != ,(charset-id 'eight-bit-graphic)) |
|---|
| 148 |
(if (r0 != ,(charset-id 'eight-bit-control)) |
|---|
| 149 |
(r1 = ??)))) |
|---|
| 150 |
(write-repeat r1)))) |
|---|
| 151 |
"CCL program to encode KOI8-R.") |
|---|
| 152 |
|
|---|
| 153 |
(defun cyrillic-unify-encoding (table) |
|---|
| 154 |
"Set up equivalent characters in the encoding TABLE. |
|---|
| 155 |
This works whether or not the table is Unicode-based or |
|---|
| 156 |
8859-5-based. (Only appropriate for Cyrillic.)" |
|---|
| 157 |
(let ((table (get table 'translation-table))) |
|---|
| 158 |
(dotimes (i 96) |
|---|
| 159 |
(let* ((c (make-char 'cyrillic-iso8859-5 (+ i 32))) |
|---|
| 160 |
(u |
|---|
| 161 |
(cond ((eq c ?,L (B) ?,A (B) |
|---|
| 162 |
((eq c ?,L-(B) ?,A-(B) |
|---|
| 163 |
((eq c ?,L}(B) ?,A'(B) |
|---|
| 164 |
(t (decode-char 'ucs (+ #x400 i))))) |
|---|
| 165 |
(ec (aref table c)) |
|---|
| 166 |
(uc (aref table u))) |
|---|
| 167 |
(unless (memq c '(?,L (B ?,L-(B ?,L}(B)) |
|---|
| 168 |
(unless uc |
|---|
| 169 |
(aset table u ec)) |
|---|
| 170 |
(unless ec |
|---|
| 171 |
(aset table c uc))))))) |
|---|
| 172 |
|
|---|
| 173 |
(cyrillic-unify-encoding 'cyrillic-koi8-r-encode-table) |
|---|
| 174 |
|
|---|
| 175 |
(make-coding-system |
|---|
| 176 |
'cyrillic-koi8 4 |
|---|
| 177 |
|
|---|
| 178 |
|
|---|
| 179 |
|
|---|
| 180 |
|
|---|
| 181 |
?R "KOI8-R 8-bit encoding for Cyrillic (MIME: KOI8-R)." |
|---|
| 182 |
'(ccl-decode-koi8 . ccl-encode-koi8) |
|---|
| 183 |
`((safe-chars . cyrillic-koi8-r-encode-table) |
|---|
| 184 |
(mime-charset . koi8-r) |
|---|
| 185 |
(valid-codes (0 . 255)) |
|---|
| 186 |
(dependency unify-8859-on-encoding-mode unify-8859-on-decoding-mode))) |
|---|
| 187 |
|
|---|
| 188 |
(define-coding-system-alias 'koi8-r 'cyrillic-koi8) |
|---|
| 189 |
(define-coding-system-alias 'koi8 'cyrillic-koi8) |
|---|
| 190 |
(define-coding-system-alias 'cp878 'cyrillic-koi8) |
|---|
| 191 |
|
|---|
| 192 |
(let ((elt `("koi8-r" koi8-r 1 |
|---|
| 193 |
,(get 'cyrillic-koi8-r-encode-table 'translation-table))) |
|---|
| 194 |
(slot (assoc "koi8-r" ctext-non-standard-encodings-alist))) |
|---|
| 195 |
(if slot |
|---|
| 196 |
(setcdr slot (cdr elt)) |
|---|
| 197 |
(push elt ctext-non-standard-encodings-alist))) |
|---|
| 198 |
|
|---|
| 199 |
|
|---|
| 200 |
|
|---|
| 201 |
|
|---|
| 202 |
|
|---|
| 203 |
|
|---|
| 204 |
(define-ccl-program ccl-encode-8859-5-font |
|---|
| 205 |
`(0 |
|---|
| 206 |
((if (r0 == ,(charset-id 'cyrillic-iso8859-5)) |
|---|
| 207 |
(r1 += 128) |
|---|
| 208 |
(if (r0 == ,(charset-id 'mule-unicode-0100-24ff)) |
|---|
| 209 |
(r1 = (r2 + 128)))))) |
|---|
| 210 |
"Encode ISO 8859-5 and Cyrillic Unicode chars to 8859-5 font.") |
|---|
| 211 |
|
|---|
| 212 |
(add-to-list 'font-ccl-encoder-alist '("iso8859-5" . ccl-encode-8859-5-font)) |
|---|
| 213 |
|
|---|
| 214 |
|
|---|
| 215 |
(define-ccl-program ccl-encode-koi8-font |
|---|
| 216 |
`(0 |
|---|
| 217 |
(if (r2 >= 0) |
|---|
| 218 |
((r1 <<= 7) |
|---|
| 219 |
(r1 += r2))) |
|---|
| 220 |
(translate-character cyrillic-koi8-r-encode-table r0 r1)) |
|---|
| 221 |
"CCL program to encode Cyrillic chars to KOI font.") |
|---|
| 222 |
|
|---|
| 223 |
(add-to-list 'font-ccl-encoder-alist '("koi8" . ccl-encode-koi8-font)) |
|---|
| 224 |
|
|---|
| 225 |
(set-language-info-alist |
|---|
| 226 |
"Cyrillic-KOI8" `((charset cyrillic-iso8859-5) |
|---|
| 227 |
(nonascii-translation |
|---|
| 228 |
. ,(get 'cyrillic-koi8-r-nonascii-translation-table |
|---|
| 229 |
'translation-table)) |
|---|
| 230 |
(coding-system cyrillic-koi8) |
|---|
| 231 |
(coding-priority cyrillic-koi8 cyrillic-iso-8bit) |
|---|
| 232 |
(ctext-non-standard-encodings "koi8-r") |
|---|
| 233 |
(input-method . "russian-typewriter") |
|---|
| 234 |
(features cyril-util) |
|---|
| 235 |
(unibyte-display . cyrillic-koi8) |
|---|
| 236 |
(sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") |
|---|
| 237 |
(documentation . "Support for Cyrillic KOI8-R.")) |
|---|
| 238 |
'("Cyrillic")) |
|---|
| 239 |
|
|---|
| 240 |
(set-language-info-alist |
|---|
| 241 |
"Russian" `((charset cyrillic-iso8859-5) |
|---|
| 242 |
(nonascii-translation |
|---|
| 243 |
. ,(get 'cyrillic-koi8-r-nonascii-translation-table |
|---|
| 244 |
'translation-table)) |
|---|
| 245 |
(coding-system cyrillic-koi8) |
|---|
| 246 |
(coding-priority cyrillic-koi8 cyrillic-iso-8bit) |
|---|
| 247 |
(input-method . "russian-computer") |
|---|
| 248 |
(features cyril-util) |
|---|
| 249 |
(unibyte-display . cyrillic-koi8) |
|---|
| 250 |
(sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") |
|---|
| 251 |
(documentation . "\ |
|---|
| 252 |
Support for Russian using koi8-r and the russian-computer input method.") |
|---|
| 253 |
(tutorial . "TUTORIAL.ru")) |
|---|
| 254 |
'("Cyrillic")) |
|---|
| 255 |
|
|---|
| 256 |
|
|---|
| 257 |
(defvar cyrillic-koi8-u-decode-table |
|---|
| 258 |
[ |
|---|
| 259 |
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|---|
| 260 |
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|---|
| 261 |
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|---|
| 262 |
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|---|
| 263 |
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|---|
| 264 |
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|---|
| 265 |
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|---|
| 266 |
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|---|
| 267 |
|
|---|
| 268 |
|
|---|
| 269 |
|
|---|
| 270 |
|
|---|
| 271 |
|
|---|
| 272 |
|
|---|
| 273 |
|
|---|
| 274 |
|
|---|
| 275 |
|
|---|
| 276 |
|
|---|
| 277 |
?$,2 (B ?$,2 "(B ?$,2 ,(B ?$,2 0(B ?$,2 4(B ?$,2 8(B ?$,2 <(B ?$,2 D(B ?$,2 L(B ?$,2 T(B ?$,2 \(B ?$,2!@(B ?$,2!D(B ?$,2!H(B ?$,2!L(B ?$,2!P(B |
|---|
| 278 |
|
|---|
| 279 |
|
|---|
| 280 |
|
|---|
| 281 |
|
|---|
| 282 |
|
|---|
| 283 |
|
|---|
| 284 |
|
|---|
| 285 |
|
|---|
| 286 |
Cyrillic KOI8-U decoding table.") |
|---|
| 287 |
|
|---|
| 288 |
|
|---|
| 289 |
|
|---|
| 290 |
|
|---|
| 291 |
|
|---|
| 292 |
|
|---|
| 293 |
|
|---|
| 294 |
|
|---|
| 295 |
|
|---|
| 296 |
|
|---|
| 297 |
|
|---|
| 298 |
|
|---|
| 299 |
|
|---|
| 300 |
|
|---|
| 301 |
|
|---|
| 302 |
|
|---|
| 303 |
|
|---|
| 304 |
|
|---|
| 305 |
|
|---|
| 306 |
|
|---|
| 307 |
CCL program to decode KOI8-U.") |
|---|
| 308 |
|
|---|
| 309 |
|
|---|
| 310 |
|
|---|
| 311 |
|
|---|
| 312 |
|
|---|
| 313 |
|
|---|
| 314 |
|
|---|
| 315 |
|
|---|
| 316 |
|
|---|
| 317 |
|
|---|
| 318 |
|
|---|
| 319 |
CCL program to encode KOI8-U.") |
|---|
| 320 |
|
|---|
| 321 |
|
|---|
| 322 |
|
|---|
| 323 |
|
|---|
| 324 |
|
|---|
| 325 |
KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)" |
|---|
| 326 |
|
|---|
| 327 |
|
|---|
| 328 |
|
|---|
| 329 |
|
|---|
| 330 |
|
|---|
| 331 |
|
|---|
| 332 |
|
|---|
| 333 |
|
|---|
| 334 |
|
|---|
| 335 |
CCL program to encode Cyrillic chars to KOI-U font.") |
|---|
| 336 |
|
|---|
| 337 |
koi8-u" . ccl-encode-koi8-u-font)) |
|---|
| 338 |
|
|---|
| 339 |
|
|---|
| 340 |
Ukrainian" `((coding-system koi8-u) |
|---|
| 341 |
|
|---|
| 342 |
|
|---|
| 343 |
|
|---|
| 344 |
|
|---|
| 345 |
ukrainian-computer") |
|---|
| 346 |
|
|---|
| 347 |
Support for Ukrainian with KOI8-U character set.")) |
|---|
| 348 |
Cyrillic")) |
|---|
| 349 |
|
|---|
| 350 |
|
|---|
| 351 |
|
|---|
| 352 |
|
|---|
| 353 |
|
|---|
| 354 |
|
|---|
| 355 |
|
|---|
| 356 |
|
|---|
| 357 |
|
|---|
| 358 |
|
|---|
| 359 |
|
|---|
| 360 |
|
|---|
| 361 |
|
|---|
| 362 |
|
|---|
| 363 |
|
|---|
| 364 |
|
|---|
| 365 |
|
|---|
| 366 |
|
|---|
| 367 |
|
|---|
| 368 |
(B ?$,2 D(B ?$,2!!(B ?$,2!"(B ?$,2 v(B ?$,2 u(B ?$,2!#(B ?$,2 q(B ?$,2 w(B ?$,2 }(B ?$,2 |(B ?$,2 {(B ?$,2 0(B |
|---|
| 369 |
|
|---|
| 370 |
|
|---|
| 371 |
|
|---|
| 372 |
|
|---|
| 373 |
|
|---|
| 374 |
|
|---|
| 375 |
|
|---|
| 376 |
|
|---|
| 377 |
(B ?$,2 D(B ?$,2!!(B ?$,2!"(B ?$,2 v(B ?$,2 u(B ?$,2!#(B ?$,2 q(B ?$,2 w(B ?$,2 }(B ?$,2 |(B ?$,2 {(B ?$,2 0(B |
|---|
| 378 |
|
|---|
| 379 |
|
|---|
| 380 |
|
|---|
| 381 |
|
|---|
| 382 |
|
|---|
| 383 |
|
|---|
| 384 |
|
|---|
| 385 |
Cyrillic ALTERNATIVNYJ decoding table.") |
|---|
| 386 |
|
|---|
| 387 |
|
|---|
| 388 |
|
|---|
| 389 |
|
|---|
| 390 |
|
|---|
| 391 |
|
|---|
| 392 |
|
|---|
| 393 |
|
|---|
| 394 |
|
|---|
| 395 |
|
|---|
| 396 |
|
|---|
| 397 |
|
|---|
| 398 |
|
|---|
| 399 |
|
|---|
| 400 |
|
|---|
| 401 |
|
|---|
| 402 |
|
|---|
| 403 |
|
|---|
| 404 |
|
|---|
| 405 |
|
|---|
| 406 |
|
|---|
| 407 |
|
|---|
| 408 |
CCL program to decode Alternativnyj.") |
|---|
| 409 |
|
|---|
| 410 |
|
|---|
| 411 |
|
|---|
| 412 |
|
|---|
| 413 |
|
|---|
| 414 |
|
|---|
| 415 |
|
|---|
| 416 |
|
|---|
| 417 |
|
|---|
| 418 |
|
|---|
| 419 |
|
|---|
| 420 |
CCL program to encode Alternativnyj.") |
|---|
| 421 |
|
|---|
| 422 |
|
|---|
| 423 |
|
|---|
| 424 |
|
|---|
| 425 |
|
|---|
| 426 |
ALTERNATIVNYJ 8-bit encoding for Cyrillic." |
|---|
| 427 |
|
|---|
| 428 |
|
|---|
| 429 |
|
|---|
| 430 |
|
|---|
| 431 |
|
|---|
| 432 |
|
|---|
| 433 |
|
|---|
| 434 |
|
|---|
| 435 |
|
|---|
| 436 |
|
|---|
| 437 |
CCL program to encode Cyrillic chars to Alternativnyj font.") |
|---|
| 438 |
|
|---|
| 439 |
|
|---|
| 440 |
alternativnyj" . ccl-encode-alternativnyj-font)) |
|---|
| 441 |
|
|---|
| 442 |
|
|---|
| 443 |
Cyrillic-ALT" `((charset cyrillic-iso8859-5) |
|---|
| 444 |
|
|---|
| 445 |
|
|---|
| 446 |
|
|---|
| 447 |
|
|---|
| 448 |
|
|---|
| 449 |
russian-typewriter") |
|---|
| 450 |
|
|---|
| 451 |
|
|---|
| 452 |
Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") |
|---|
| 453 |
Support for Cyrillic ALTERNATIVNYJ.")) |
|---|
| 454 |
Cyrillic")) |
|---|
| 455 |
|
|---|
| 456 |
|
|---|
| 457 |
Tajik" `((coding-system cyrillic-koi8-t) |
|---|
| 458 |
|
|---|
| 459 |
|
|---|
| 460 |
|
|---|
| 461 |
russian-typewriter") ; fixme? |
|---|
| 462 |
|
|---|
| 463 |
Support for Tajik using KOI8-T.")) |
|---|
| 464 |
Cyrillic")) |
|---|
| 465 |
|
|---|
| 466 |
|
|---|
| 467 |
|
|---|
| 468 |
|
|---|
| 469 |
|
|---|
| 470 |
|
|---|
| 471 |
(B ?\$,1(#(B ?\$,1rz(B ?\$,1(s(B ?\$,1r~(B ?\$,1s&(B ?\$,1s (B ?\$,1s!(B ?\$,1tL(B ?\$,1s0(B ?\$,1()(B ?\$,1s9(B ?\$,1(*(B ?\$,1(,(B ?\$,1(+(B ?\$,1(/(B ?\$,1(r(B |
|---|
| 472 |
?\$,1rx(B ?\$,1ry(B ?\$,1r|(B ?\$,1r}(B ?\$,1s"(B ?\$,1rs(B ?\$,1rt(B nil ?\$,1ub(B ?\$,1(y(B ?\$,1s:(B ?\$,1(z(B ?\$,1(|(B ?\$,1({(B ?\$,1((B ?\,A (B ?\$,1(.(B |
|---|
| 473 |
?\$,1(~(B ?\$,1(((B ?\,A$(B ?\$,1)P(B ?\,A&(B ?\,A'(B ?\$,1(!(B ?\,A)(B ?\$,1($(B ?\,A+(B ?\,A,(B ?\,A-(B ?\,A.(B ?\$,1('(B ?\,A0(B ?\,A1(B ?\$,1(&(B |
|---|
| 474 |
?\$,1(v(B ?\$,1)Q(B ?\,A5(B ?\,A6(B ?\,A7(B ?\$,1(q(B ?\$,1uV(B ?\$,1(t(B ?\,A;(B ?\$,1(x(B ?\$,1(%(B ?\$,1(u(B ?\$,1(w(B ?\$,1(0(B ?\$,1(1(B ?\$,1(2(B ?\$,1(3(B |
|---|
| 475 |
?\$,1(4(B ?\$,1(5(B ?\$,1(6(B ?\$,1(7(B ?\$,1(8(B ?\$,1(9(B ?\$,1(:(B ?\$,1(;(B ?\$,1(<(B ?\$,1(=(B ?\$,1(>(B ?\$,1(?(B ?\$,1(@(B ?\$,1(A(B ?\$,1(B(B ?\$,1(C(B ?\$,1(D(B |
|---|
| 476 |
?\$,1(E(B ?\$,1(F(B ?\$,1(G(B ?\$,1(H(B ?\$,1(I(B ?\$,1(J(B ?\$,1(K(B ?\$,1(L(B ?\$,1(M(B ?\$,1(N(B ?\$,1(O(B ?\$,1(P(B ?\$,1(Q(B ?\$,1(R(B ?\$,1(S(B ?\$,1(T(B ?\$,1(U(B |
|---|
| 477 |
?\$,1(V(B ?\$,1(W(B ?\$,1(X(B ?\$,1(Y(B ?\$,1(Z(B ?\$,1([(B ?\$,1(\(B ?\$,1(](B ?\$,1(^(B ?\$,1(_(B ?\$,1(`(B ?\$,1(a(B ?\$,1(b(B ?\$,1(c(B ?\$,1(d(B ?\$,1(e(B ?\$,1(f(B |
|---|
| 478 |
?\$,1(g(B ?\$,1(h(B ?\$,1(i(B ?\$,1(j(B ?\$,1(k(B ?\$,1(l(B ?\$,1(m(B ?\$,1(n(B ?\$,1(o(B] nil ?b))) |
|---|
| 479 |
|
|---|
| 480 |
;; Register cyrillic-iso8859-5 characters in the encode table of |
|---|
| 481 |
;; windows-1251. |
|---|
| 482 |
(let ((table (get 'encode-windows-1251 'translation-table)) |
|---|
| 483 |
;; Nth element is a cyrillic-iso8859-5 character encoded to a |
|---|
| 484 |
;; code (128 + N), or nil. |
|---|
| 485 |
(vec [?\,L"(B ?\,L#(B nil ?\,Ls(B nil nil nil nil nil nil ?\,L)(B nil ?\,L*(B ?\,L,(B ?\,L+(B ?\,L/(B |
|---|
| 486 |
?\,Lr(B nil nil nil nil nil nil nil nil nil ?\,Ly(B nil ?\,Lz(B ?\,L|(B ?\,L{(B ?\,L(B |
|---|
| 487 |
nil ?\,L.(B ?\,L~(B ?\,L((B nil nil nil nil ?\,L!(B nil ?\,L$(B nil nil nil nil ?\,L'(B |
|---|
| 488 |
nil nil ?\,L&(B ?\,Lv(B nil nil nil nil ?\,Lq(B ?\,Lp(B ?\,Lt(B nil ?\,Lx(B ?\,L%(B ?\,Lu(B ?\,Lw(B |
|---|
| 489 |
?\,L0(B ?\,L1(B ?\,L2(B ?\,L3(B ?\,L4(B ?\,L5(B ?\,L6(B ?\,L7(B ?\,L8(B ?\,L9(B ?\,L:(B ?\,L |
|---|
| 490 |
?\,L@(B ?\,LA(B ?\,LB(B ?\,LC(B ?\,LD(B ?\,LE(B ?\,LF(B ?\,LG(B ?\,LH(B ?\,LI(B ?\,LJ(B ?\,LK(B ?\,LL(B ?\,LM(B ?\,LN(B ?\,LO(B |
|---|
| 491 |
?\,LP(B ?\,LQ(B ?\,LR(B ?\,LS(B ?\,LT(B ?\,LU(B ?\,LV(B ?\,LW(B ?\,LX(B ?\,LY(B ?\,LZ(B ?\,L[(B ?\,L\(B ?\,L](B ?\,L^(B ?\,L_(B |
|---|
| 492 |
?\,L`(B ?\,La(B ?\,Lb(B ?\,Lc(B ?\,Ld(B ?\,Le(B ?\,Lf(B ?\,Lg(B ?\,Lh(B ?\,Li(B ?\,Lj(B ?\,Lk(B ?\,Ll(B ?\,Lm(B ?\,Ln(B ?\,Lo(B])) |
|---|
| 493 |
(dotimes (i (length vec)) |
|---|
| 494 |
(if (aref vec i) |
|---|
| 495 |
(aset table (aref vec i) (+ 128 i))))) |
|---|
| 496 |
|
|---|
| 497 |
(define-coding-system-alias 'cp1251 'windows-1251) |
|---|
| 498 |
|
|---|
| 499 |
(let ((elt `("microsoft-cp1251" windows-1251 1 |
|---|
| 500 |
,(get 'encode-windows-1251 'translation-table))) |
|---|
| 501 |
(slot (assoc "microsoft-cp1251" ctext-non-standard-encodings-alist))) |
|---|
| 502 |
(if slot |
|---|
| 503 |
(setcdr slot (cdr elt)) |
|---|
| 504 |
(push elt ctext-non-standard-encodings-alist))) |
|---|
| 505 |
|
|---|
| 506 |
(define-ccl-program ccl-encode-windows-1251-font |
|---|
| 507 |
`(0 |
|---|
| 508 |
((if (r0 == ,(charset-id 'mule-unicode-0100-24ff)) |
|---|
| 509 |
((r1 <<= 7) |
|---|
| 510 |
(r1 += r2))) |
|---|
| 511 |
(translate-character encode-windows-1251 r0 r1)))) |
|---|
| 512 |
|
|---|
| 513 |
(add-to-list 'font-ccl-encoder-alist |
|---|
| 514 |
'("microsoft-cp1251" . ccl-encode-windows-1251-font)) |
|---|
| 515 |
|
|---|
| 516 |
(set-language-info-alist |
|---|
| 517 |
"Bulgarian" `((coding-system windows-1251) |
|---|
| 518 |
(coding-priority windows-1251) |
|---|
| 519 |
(ctext-non-standard-encodings "microsoft-cp1251") |
|---|
| 520 |
(overriding-fontspec |
|---|
| 521 |
(,(get 'encode-windows-1251 'translation-table) |
|---|
| 522 |
. (nil . "microsoft-cp1251")) |
|---|
| 523 |
(,(get 'cyrillic-koi8-r-encode-table 'translation-table) |
|---|
| 524 |
. (nil . "koi8-r"))) |
|---|
| 525 |
(nonascii-translation |
|---|
| 526 |
. ,(get 'decode-windows-1251 'translation-table)) |
|---|
| 527 |
(input-method . "bulgarian-bds") |
|---|
| 528 |
(documentation |
|---|
| 529 |
. "Support for Bulgarian with windows-1251 character set.") |
|---|
| 530 |
(tutorial . "TUTORIAL.bg")) |
|---|
| 531 |
'("Cyrillic")) |
|---|
| 532 |
|
|---|
| 533 |
(set-language-info-alist |
|---|
| 534 |
"Belarusian" `((coding-system windows-1251) |
|---|
| 535 |
(coding-priority windows-1251) |
|---|
| 536 |
(ctext-non-standard-encodings "microsoft-cp1251") |
|---|
| 537 |
(overriding-fontspec |
|---|
| 538 |
(,(get 'encode-windows-1251 'translation-table) |
|---|
| 539 |
. (nil . "microsoft-cp1251")) |
|---|
| 540 |
(,(get 'cyrillic-koi8-r-encode-table 'translation-table) |
|---|
| 541 |
. (nil . "koi8-r"))) |
|---|
| 542 |
(nonascii-translation |
|---|
| 543 |
. ,(get 'decode-windows-1251 'translation-table)) |
|---|
| 544 |
(input-method . "belarusian") |
|---|
| 545 |
(documentation |
|---|
| 546 |
. "Support for Belarusian with windows-1251 character set. |
|---|
| 547 |
\(The name Belarusian replaced Byelorussian in the early 1990s.)")) |
|---|
| 548 |
'("Cyrillic")) |
|---|
| 549 |
|
|---|
| 550 |
(provide 'cyrillic) |
|---|
| 551 |
|
|---|
| 552 |
|
|---|
| 553 |
|
|---|
| 554 |
|
|---|