;;; Chinese (general)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(make-coding-system
- 'iso-2022-cn 2 ?C
+(define-coding-system 'iso-2022-cn
"ISO 2022 based 7bit encoding for Chinese GB and CNS (MIME:ISO-2022-CN)."
- '(ascii
- (nil chinese-gb2312 chinese-cns11643-1)
- (nil chinese-cns11643-2)
- nil
- nil ascii-eol ascii-cntl seven locking-shift single-shift nil nil nil
- init-bol)
- '((safe-charsets ascii chinese-gb2312 chinese-cns11643-1 chinese-cns11643-2)
- (mime-charset . iso-2022-cn)))
+ :coding-type 'iso-2022
+ :mnemonic ?C
+ :charset-list '(ascii chinese-gb2312 chinese-cns11643-1 chinese-cns11643-2)
+ :designation [ascii
+ (nil chinese-gb2312 chinese-cns11643-1)
+ (nil chinese-cns11643-2)
+ nil]
+ :flags '(ascii-at-eol ascii-at-cntl 7-bit
+ designation locking-shift single-shift init-at-bol)
+ :plist '(mime-charset . iso-2022-cn))
(define-coding-system-alias 'chinese-iso-7bit 'iso-2022-cn)
-(make-coding-system
- 'iso-2022-cn-ext 2 ?C
- "ISO 2022 based 7bit encoding for Chinese GB and CNS (MIME:ISO-2022-CN-EXT)."
- '(ascii
- (nil chinese-gb2312 chinese-cns11643-1)
- (nil chinese-cns11643-2)
- (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
- chinese-cns11643-6 chinese-cns11643-7)
- nil ascii-eol ascii-cntl seven locking-shift single-shift nil nil nil
- init-bol)
- '((safe-charsets ascii chinese-gb2312 chinese-cns11643-1 chinese-cns11643-2
- chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
- chinese-cns11643-6 chinese-cns11643-7)
- (mime-charset . iso-2022-cn-ext)))
+(define-coding-system 'iso-2022-cn-ext
+ "ISO 2022 based 7bit encoding for Chinese GB and CNS (MIME:ISO-2022-CN-EXT)."
+ :coding-type 'iso-2022
+ :mnemonic ?C
+ :charset-list '(ascii
+ chinese-gb2312 chinese-cns11643-1
+ chinese-cns11643-2 chinese-cns11643-3 chinese-cns11643-4
+ chinese-cns11643-5 chinese-cns11643-6 chinese-cns11643-7)
+ :designation '[ascii
+ (nil chinese-gb2312 chinese-cns11643-1)
+ (nil chinese-cns11643-2)
+ (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
+ chinese-cns11643-6 chinese-cns11643-7)]
+ :flags '(ascii-at-eol ascii-at-cntl 7-bit
+ designation locking-shift single-shift init-at-bol)
+ :plist '(mime-charset iso-2022-cn-ext))
\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Chinese GB2312 (simplified)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(make-coding-system
- 'chinese-iso-8bit 2 ?c
- "ISO 2022 based EUC encoding for Chinese GB2312 (MIME:GB2312)."
- '(ascii chinese-gb2312 nil nil
- nil ascii-eol ascii-cntl nil nil nil nil)
- '((safe-charsets ascii chinese-gb2312)
- (mime-charset . gb2312)))
+(define-coding-system 'chinese-iso-8bit
+ "ISO 2022 based EUC encoding for Chinese GB2312 (MIME:CN-GB)."
+ :coding-type 'iso-2022
+ :mnemonic ?c
+ :charset-list '(ascii chinese-gb2312)
+ :designation [ascii chinese-gb2312 nil nil]
+ :plist '(mime-charset cn-gb))
(define-coding-system-alias 'cn-gb-2312 'chinese-iso-8bit)
(define-coding-system-alias 'euc-china 'chinese-iso-8bit)
(define-coding-system-alias 'cn-gb 'chinese-iso-8bit)
(define-coding-system-alias 'gb2312 'chinese-iso-8bit)
-(make-coding-system
- 'chinese-hz 0 ?z
+(define-coding-system 'chinese-hz
"Hz/ZW 7-bit encoding for Chinese GB2312 (MIME:HZ-GB-2312)."
- nil
- '((safe-charsets ascii chinese-gb2312)
- (mime-charset . hz-gb-2312)
- (post-read-conversion . post-read-decode-hz)
- (pre-write-conversion . pre-write-encode-hz)))
+ :coding-type 'utf-8
+ :mnemonic ?z
+ :charset-list '(ascii chinese-gb2312)
+ :plist '(mime-charset hz-gb-2312)
+ :post-read-conversion 'post-read-decode-hz
+ :pre-write-conversion 'pre-write-encode-hz)
(define-coding-system-alias 'hz-gb-2312 'chinese-hz)
(define-coding-system-alias 'hz 'chinese-hz)
;; Chinese BIG5 (traditional)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(make-coding-system
- 'chinese-big5 3 ?B
- "BIG5 8-bit encoding for Chinese (MIME:Big5)."
- nil
- '((safe-charsets ascii chinese-big5-1 chinese-big5-2)
- (mime-charset . big5)
- (charset-origin-alist (chinese-big5-1 "BIG5" encode-big5-char)
- (chinese-big5-2 "BIG5" encode-big5-char))))
+(define-coding-system 'chinese-big5
+ "BIG5 8-bit encoding for Chinese (MIME:Big5)"
+ :coding-type 'big5
+ :mnemonic ?B
+ :charset-list '(ascii big5)
+ :plist '(mime-charset big5))
(define-coding-system-alias 'big5 'chinese-big5)
(define-coding-system-alias 'cn-big5 'chinese-big5)
-;; Big5 font requires special encoding.
-(define-ccl-program ccl-encode-big5-font
- `(0
- ;; In: R0:chinese-big5-1 or chinese-big5-2
- ;; R1:position code 1
- ;; R2:position code 2
- ;; Out: R1:font code point 1
- ;; R2:font code point 2
- ((r2 = ((((r1 - ?\x21) * 94) + r2) - ?\x21))
- (if (r0 == ,(charset-id 'chinese-big5-2)) (r2 += 6280))
- (r1 = ((r2 / 157) + ?\xA1))
- (r2 %= 157)
- (if (r2 < ?\x3F) (r2 += ?\x40) (r2 += ?\x62))))
- "CCL program to encode a Big5 code to code point of Big5 font.")
-
-(setq font-ccl-encoder-alist
- (cons (cons "big5" ccl-encode-big5-font) font-ccl-encoder-alist))
-
(set-language-info-alist
"Chinese-BIG5" '((charset chinese-big5-1 chinese-big5-2)
(coding-system chinese-big5 chinese-iso-7bit)
;; Chinese CNS11643 (traditional)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar big5-to-cns (make-translation-table)
- "Translation table for encoding to `euc-tw'.")
-;; Could have been done by china-util loaded before.
-(unless (get 'big5-to-cns 'translation-table)
- (define-translation-table 'big5-to-cns big5-to-cns))
-
-(define-ccl-program ccl-decode-euc-tw
- ;; CNS plane 1 needs either two or four bytes in EUC-TW encoding;
- ;; CNS planes 2 to 7 always need four bytes. In internal encoding of
- ;; Emacs, CNS planes 1 and 2 need three bytes, and planes 3 to 7 need
- ;; four bytes. Thus a buffer magnification value of 2 (for both
- ;; encoding and decoding) is sufficient.
- `(2
- ;; we don't have enough registers to hold all charset-ids
- ((r4 = ,(charset-id 'chinese-cns11643-1))
- (r5 = ,(charset-id 'chinese-cns11643-2))
- (r6 = ,(charset-id 'chinese-cns11643-3))
- (loop
- (read-if (r0 < #x80)
- ;; ASCII
- (write-repeat r0)
- ;; not ASCII
- (if (r0 == #x8E)
- ;; single shift
- (read-if (r1 < #xA1)
- ;; invalid byte
- ((write r0)
- (write-repeat r1))
- (if (r1 > #xA7)
- ;; invalid plane
- ((write r0)
- (write-repeat r1))
- ;; OK, we have a plane
- (read-if (r2 < #xA1)
- ;; invalid first byte
- ((write r0 r1)
- (write-repeat r2))
- (read-if (r3 < #xA1)
- ;; invalid second byte
- ((write r0 r1 r2)
- (write-repeat r3))
- ;; CNS 1-7, finally
- ((branch (r1 - #xA1)
- (r1 = r4)
- (r1 = r5)
- (r1 = r6)
- (r1 = ,(charset-id 'chinese-cns11643-4))
- (r1 = ,(charset-id 'chinese-cns11643-5))
- (r1 = ,(charset-id 'chinese-cns11643-6))
- (r1 = ,(charset-id 'chinese-cns11643-7)))
- (r2 = ((((r2 - #x80) << 7) + r3) - #x80))
- (write-multibyte-character r1 r2)
- (repeat))))))
- ;; standard EUC
- (if (r0 < #xA1)
- ;; invalid first byte
- (write-repeat r0)
- (read-if (r1 < #xA1)
- ;; invalid second byte
- ((write r0)
- (write-repeat r1))
- ;; CNS 1, finally
- ((r1 = ((((r0 - #x80) << 7) + r1) - #x80))
- (write-multibyte-character r4 r1)
- (repeat)))))))))
- "CCL program to decode EUC-TW encoding."
-)
-
-(define-ccl-program ccl-encode-euc-tw
- `(2
- ;; we don't have enough registers to hold all charset-ids
- ((r2 = ,(charset-id 'ascii))
- (r3 = ,(charset-id 'chinese-big5-1))
- (r4 = ,(charset-id 'chinese-big5-2))
- (r5 = ,(charset-id 'chinese-cns11643-1))
- (r6 = ,(charset-id 'chinese-cns11643-2))
- (loop
- (read-multibyte-character r0 r1)
- (if (r0 == r2)
- (write-repeat r1)
- (;; Big 5 encoded characters are first translated to CNS
- (if (r0 == r3)
- (translate-character big5-to-cns r0 r1)
- (if (r0 == r4)
- (translate-character big5-to-cns r0 r1)))
- (if (r0 == r5)
- (r0 = #xA1)
- (if (r0 == r6)
- (r0 = #xA2)
- (if (r0 == ,(charset-id 'chinese-cns11643-3))
- (r0 = #xA3)
- (if (r0 == ,(charset-id 'chinese-cns11643-4))
- (r0 = #xA4)
- (if (r0 == ,(charset-id 'chinese-cns11643-5))
- (r0 = #xA5)
- (if (r0 == ,(charset-id 'chinese-cns11643-6))
- (r0 = #xA6)
- (if (r0 == ,(charset-id 'chinese-cns11643-7))
- (r0 = #xA7)
- ;; not CNS. We use a dummy character which
- ;; can't occur in EUC-TW encoding to indicate
- ;; this.
- (write-repeat #xFF))))))))))
- (if (r0 != #xA1)
- ;; single shift and CNS plane
- ((write #x8E)
- (write r0)))
- (write ((r1 >> 7) + #x80))
- (write ((r1 % #x80) + #x80))
- (repeat))))
- "CCL program to encode EUC-TW encoding."
-)
-
-(defun euc-tw-pre-write-conversion (beg end)
- "Semi-dummy pre-write function effectively to autoload china-util."
- ;; Ensure translation table is loaded.
- (require 'china-util)
- ;; Don't do this again.
- (coding-system-put 'euc-tw 'pre-write-conversion nil)
- nil)
-
-(make-coding-system
- 'euc-tw 4 ?Z
- "ISO 2022 based EUC encoding for Chinese CNS11643.
-Big5 encoding is accepted for input also (which is then converted to CNS)."
- '(ccl-decode-euc-tw . ccl-encode-euc-tw)
- '((safe-charsets ascii
- chinese-big5-1
- chinese-big5-2
- chinese-cns11643-1
- chinese-cns11643-2
- chinese-cns11643-3
- chinese-cns11643-4
- chinese-cns11643-5
- chinese-cns11643-6
- chinese-cns11643-7)
- (valid-codes (0 . 255))
- (pre-write-conversion . euc-tw-pre-write-conversion)))
+(define-coding-system 'euc-tw
+ "ISO 2022 based EUC encoding for Chinese CNS11643."
+ :coding-type 'iso-2022
+ :mnemonic ?Z
+ :charset-list '(ascii
+ chinese-cns11643-1
+ chinese-cns11643-2
+ chinese-cns11643-3
+ chinese-cns11643-4
+ chinese-cns11643-5
+ chinese-cns11643-6
+ chinese-cns11643-7)
+ :designation [ascii chinese-cns11643-1 (chinese-cns11643-1
+ chinese-cns11643-2
+ chinese-cns11643-3
+ chinese-cns11643-4
+ chinese-cns11643-5
+ chinese-cns11643-6
+ chinese-cns11643-7) nil]
+ :plist '(mime-charset euc-tw))
(define-coding-system-alias 'euc-taiwan 'euc-tw)
;; ISO-8859-5 staff
-(make-coding-system
- 'cyrillic-iso-8bit 2 ?5
- "ISO 2022 based 8-bit encoding for Cyrillic script (MIME:ISO-8859-5)."
- '(ascii cyrillic-iso8859-5 nil nil
- nil nil nil nil nil nil nil)
- '((safe-charsets ascii cyrillic-iso8859-5)
- (mime-charset . iso-8859-5)))
+(define-coding-system 'cyrillic-iso-8bit
+ "ISO 2022 based 8-bit encoding for Cyrillic script (MIME:ISO-8859-5)."
+ :coding-type 'charset
+ :mnemonic ?5
+ :charset-list '(iso-8859-5)
+ :plist '(mime-charset iso-8859-5))
(define-coding-system-alias 'iso-8859-5 'cyrillic-iso-8bit)
(set-language-info-alist
- "Cyrillic-ISO" '((charset cyrillic-iso8859-5)
+ "Cyrillic-ISO" '((charset iso-8859-5)
(coding-system cyrillic-iso-8bit)
(coding-priority cyrillic-iso-8bit)
+ (nonascii-translation . iso-8859-5)
(input-method . "cyrillic-yawerty")
- (nonascii-translation . cyrillic-iso8859-5)
(unibyte-display . cyrillic-iso-8bit)
(features cyril-util)
(sample-text . "Russian (\e,L@caaZXY\e(B) \e,L7T`PRabRcYbU\e(B!")
;; KOI-8 staff
-(defvar cyrillic-koi8-r-decode-table
- [
- 0 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 61 62 63
- 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
- 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
- 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
- 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
- 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
- 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
- 160 161 162 ?\e,Lq\e(B 164 165 166 167 168 169 170 171 172 173 174 175
- 176 177 178 ?\e,L!\e(B 180 181 182 183 184 185 186 187 188 189 190 191
- ?\e,Ln\e(B ?\e,LP\e(B ?\e,LQ\e(B ?\e,Lf\e(B ?\e,LT\e(B ?\e,LU\e(B ?\e,Ld\e(B ?\e,LS\e(B ?\e,Le\e(B ?\e,LX\e(B ?\e,LY\e(B ?\e,LZ\e(B ?\e,L[\e(B ?\e,L\\e(B ?\e,L]\e(B ?\e,L^\e(B
- ?\e,L_\e(B ?\e,Lo\e(B ?\e,L`\e(B ?\e,La\e(B ?\e,Lb\e(B ?\e,Lc\e(B ?\e,LV\e(B ?\e,LR\e(B ?\e,Ll\e(B ?\e,Lk\e(B ?\e,LW\e(B ?\e,Lh\e(B ?\e,Lm\e(B ?\e,Li\e(B ?\e,Lg\e(B ?\e,Lj\e(B
- ?\e,LN\e(B ?\e,L0\e(B ?\e,L1\e(B ?\e,LF\e(B ?\e,L4\e(B ?\e,L5\e(B ?\e,LD\e(B ?\e,L3\e(B ?\e,LE\e(B ?\e,L8\e(B ?\e,L9\e(B ?\e,L:\e(B ?\e,L;\e(B ?\e,L<\e(B ?\e,L=\e(B ?\e,L>\e(B
- ?\e,L?\e(B ?\e,LO\e(B ?\e,L@\e(B ?\e,LA\e(B ?\e,LB\e(B ?\e,LC\e(B ?\e,L6\e(B ?\e,L2\e(B ?\e,LL\e(B ?\e,LK\e(B ?\e,L7\e(B ?\e,LH\e(B ?\e,LM\e(B ?\e,LI\e(B ?\e,LG\e(B ?\e,LJ\e(B ]
- "Cyrillic KOI8-R decoding table.")
-
-(let ((table (make-translation-table-from-vector
- cyrillic-koi8-r-decode-table)))
- (define-translation-table 'cyrillic-koi8-r-nonascii-translation-table table)
- (define-translation-table 'cyrillic-koi8-r-encode-table
- (char-table-extra-slot table 0)))
-
-(define-ccl-program ccl-decode-koi8
- `(3
- ((loop
- (r0 = 0)
- (read r1)
- (if (r1 < 128)
- (write-repeat r1)
- ((translate-character cyrillic-koi8-r-nonascii-translation-table r0 r1)
- (write-multibyte-character r0 r1)
- (repeat))))))
- "CCL program to decode KOI8.")
-
-(define-ccl-program ccl-encode-koi8
- `(1
- ((loop
- (read-multibyte-character r0 r1)
- (if (r0 == ,(charset-id 'cyrillic-iso8859-5))
- (translate-character cyrillic-koi8-r-encode-table r0 r1))
- (write-repeat r1))))
- "CCL program to encode KOI8.")
-
-(make-coding-system
- 'cyrillic-koi8 4
- ;; We used to use ?K. It is true that ?K is more strictly correct,
- ;; but it is also used for Korean.
- ;; So people who use koi8 for languages other than Russian
- ;; will have to forgive us.
- ?R
- "KOI8 8-bit encoding for Cyrillic (MIME: KOI8-R)."
- '(ccl-decode-koi8 . ccl-encode-koi8)
- `((safe-chars . ,(let ((table (make-char-table 'safe-chars))
- (i 0))
- (while (< i 256)
- (aset table (aref cyrillic-koi8-r-decode-table i) t)
- (setq i (1+ i)))
- table))
- (mime-charset . koi8-r)
- (valid-codes (0 . 127) 163 179 (192 . 255))
- (charset-origin-alist (cyrillic-iso8859-5 "KOI8-R"
- cyrillic-encode-koi8-r-char))))
+(define-coding-system 'cyrillic-koi8
+ "KOI8 8-bit encoding for Cyrillic (MIME: KOI8-R)."
+ :coding-type 'charset
+ ;; We used to use ?K. It is true that ?K is more strictly correct,
+ ;; but it is also used for Korean. So people who use koi8 for
+ ;; languages other than Russian will have to forgive us.
+ :mnemonic ?R
+ :charset-list '(koi8)
+ :plist '(mime-charset koi8-r))
(define-coding-system-alias 'koi8-r 'cyrillic-koi8)
(define-coding-system-alias 'koi8 'cyrillic-koi8)
-(define-ccl-program ccl-encode-koi8-font
- `(0
- ((translate-character cyrillic-koi8-r-encode-table r0 r1)))
- "CCL program to encode Cyrillic chars to KOI font.")
-
-(setq font-ccl-encoder-alist
- (cons '("koi8" . ccl-encode-koi8-font) font-ccl-encoder-alist))
-
(set-language-info-alist
- "Cyrillic-KOI8" `((charset cyrillic-iso8859-5)
- (nonascii-translation
- . ,(get 'cyrillic-koi8-r-nonascii-translation-table
- 'translation-table))
+ "Cyrillic-KOI8" `((charset koi8)
(coding-system cyrillic-koi8)
(coding-priority cyrillic-koi8)
+ (nonascii-translation . koi8)
(input-method . "cyrillic-jcuken")
(features cyril-util)
(unibyte-display . cyrillic-koi8)
;;; ALTERNATIVNYJ staff
-(defvar cyrillic-alternativnyj-decode-table
- [
- 0 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 61 62 63
- 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
- 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
- 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
- 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
- ?\e,L0\e(B ?\e,L1\e(B ?\e,L2\e(B ?\e,L3\e(B ?\e,L4\e(B ?\e,L5\e(B ?\e,L6\e(B ?\e,L7\e(B ?\e,L8\e(B ?\e,L9\e(B ?\e,L:\e(B ?\e,L;\e(B ?\e,L<\e(B ?\e,L=\e(B ?\e,L>\e(B ?\e,L?\e(B
- ?\e,L@\e(B ?\e,LA\e(B ?\e,LB\e(B ?\e,LC\e(B ?\e,LD\e(B ?\e,LE\e(B ?\e,LF\e(B ?\e,LG\e(B ?\e,LH\e(B ?\e,LI\e(B ?\e,LJ\e(B ?\e,LK\e(B ?\e,LL\e(B ?\e,LM\e(B ?\e,LN\e(B ?\e,LO\e(B
- ?\e,LP\e(B ?\e,LQ\e(B ?\e,LR\e(B ?\e,LS\e(B ?\e,LT\e(B ?\e,LU\e(B ?\e,LV\e(B ?\e,LW\e(B ?\e,LX\e(B ?\e,LY\e(B ?\e,LZ\e(B ?\e,L[\e(B ?\e,L\\e(B ?\e,L]\e(B ?\e,L^\e(B ?\e,L_\e(B
- 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
- 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
- 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
- ?\e,L`\e(B ?\e,La\e(B ?\e,Lb\e(B ?\e,Lc\e(B ?\e,Ld\e(B ?\e,Le\e(B ?\e,Lf\e(B ?\e,Lg\e(B ?\e,Lh\e(B ?\e,Li\e(B ?\e,Lj\e(B ?\e,Lk\e(B ?\e,Ll\e(B ?\e,Lm\e(B ?\e,Ln\e(B ?\e,Lo\e(B
- ?\e,L!\e(B ?\e,Lq\e(B 242 243 244 245 246 247 248 249 250 251 252 253 254 ?\e,Lp\e(B]
- "Cyrillic ALTERNATIVNYJ decoding table.")
-
-(let ((table (make-translation-table-from-vector
- cyrillic-alternativnyj-decode-table)))
- (define-translation-table 'cyrillic-alternativnyj-nonascii-translation-table
- table)
- (define-translation-table 'cyrillic-alternativnyj-encode-table
- (char-table-extra-slot table 0)))
-
-
-(define-ccl-program ccl-decode-alternativnyj
- `(3
- ((loop
- (r0 = 0)
- (read r1)
- (if (r1 < 128)
- (write-repeat r1)
- ((translate-character cyrillic-alternativnyj-nonascii-translation-table
- r0 r1)
- (write-multibyte-character r0 r1)
- (repeat))))))
- "CCL program to decode Alternativnyj.")
-
-(define-ccl-program ccl-encode-alternativnyj
- `(1
- ((loop
- (read-multibyte-character r0 r1)
- (translate-character cyrillic-alternativnyj-encode-table r0 r1)
- (write-repeat r1))))
- "CCL program to encode Alternativnyj.")
-
-(make-coding-system
- 'cyrillic-alternativnyj 4 ?A
- "ALTERNATIVNYJ 8-bit encoding for Cyrillic."
- '(ccl-decode-alternativnyj . ccl-encode-alternativnyj)
- `((safe-chars . ,(let ((table (make-char-table 'safe-chars))
- (i 0))
- (while (< i 256)
- (aset table (aref cyrillic-alternativnyj-decode-table i)
- t)
- (setq i (1+ i)))
- table))
- (valid-codes (0 . 175) (224 . 241) 255)
- (charset-origin-alist (cyrillic-iso8859-5 "ALTERNATIVNYJ"
- cyrillic-encode-koi8-r-char))))
-
+(define-coding-system 'cyrillic-alternativnyj
+ "ALTERNATIVNYJ 8-bit encoding for Cyrillic."
+ :coding-type 'charset
+ :mnemonic ?A
+ :charset-list '(alternativnyj))
(define-coding-system-alias 'alternativnyj 'cyrillic-alternativnyj)
-(define-ccl-program ccl-encode-alternativnyj-font
- '(0
- ((translate-character cyrillic-alternativnyj-encode-table r0 r1)))
- "CCL program to encode Cyrillic chars to Alternativnyj font.")
-
-(setq font-ccl-encoder-alist
- (cons '("alternativnyj" . ccl-encode-alternativnyj-font)
- font-ccl-encoder-alist))
-
(set-language-info-alist
- "Cyrillic-ALT" `((charset cyrillic-iso8859-5)
- (nonascii-translation
- . ,(get 'cyrillic-alternativnyj-nonascii-translation-table
- 'translation-table))
+ "Cyrillic-ALT" `((charset alternativnyj)
(coding-system cyrillic-alternativnyj)
(coding-priority cyrillic-alternativnyj)
+ (nonascii-translation . alternativnyj)
(input-method . "cyrillic-jcuken")
(features cyril-util)
(unibyte-display . cyrillic-alternativnyj)
;; Latin-1 (ISO-8859-1)
-(make-coding-system
- 'iso-latin-1 2 ?1
- "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)."
- '(ascii latin-iso8859-1 nil nil
- nil nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii latin-iso8859-1)
- (mime-charset . iso-8859-1)))
-
-(define-coding-system-alias 'iso-8859-1 'iso-latin-1)
-(define-coding-system-alias 'latin-1 'iso-latin-1)
-
(set-language-info-alist
- "Latin-1" '((charset ascii latin-iso8859-1)
+ "Latin-1" '((charset iso-8859-1)
(coding-system iso-latin-1)
(coding-priority iso-latin-1)
- (nonascii-translation . latin-iso8859-1)
+ (nonascii-translation . iso-8859-1)
(unibyte-syntax . "latin-1")
(unibyte-display . iso-latin-1)
(input-method . "latin-1-prefix")
\f
;; Latin-2 (ISO-8859-2)
-(make-coding-system
- 'iso-latin-2 2 ?2
- "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)."
- '(ascii latin-iso8859-2 nil nil
- nil nil nil nil nil nil nil)
- '((safe-charsets ascii latin-iso8859-2)
- (mime-charset . iso-8859-2)))
+(define-coding-system 'iso-latin-2
+ "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)."
+ :coding-type 'charset
+ :mnemonic ?2
+ :charset-list '(iso-8859-2)
+ :plist '(mime-charset iso-8859-2))
(define-coding-system-alias 'iso-8859-2 'iso-latin-2)
(define-coding-system-alias 'latin-2 'iso-latin-2)
(set-language-info-alist
- "Latin-2" '((charset ascii latin-iso8859-2)
+ "Latin-2" '((charset iso-8859-2)
(coding-system iso-latin-2)
(coding-priority iso-latin-2)
- (nonascii-translation . latin-iso8859-2)
+ (nonascii-translation . iso-8859-2)
(unibyte-syntax . "latin-2")
(unibyte-display . iso-latin-2)
(input-method . "latin-2-prefix")
\f
;; Latin-3 (ISO-8859-3)
-(make-coding-system
- 'iso-latin-3 2 ?3
- "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)."
- '(ascii latin-iso8859-3 nil nil
- nil nil nil nil nil nil nil)
- '((safe-charsets ascii latin-iso8859-3)
- (mime-charset . iso-8859-3)))
+(define-coding-system 'iso-latin-3
+ "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)."
+ :coding-type 'charset
+ :mnemonic ?3
+ :charset-list '(iso-8859-3)
+ :plist '(mime-charset iso-8859-3))
(define-coding-system-alias 'iso-8859-3 'iso-latin-3)
(define-coding-system-alias 'latin-3 'iso-latin-3)
(set-language-info-alist
- "Latin-3" '((charset ascii latin-iso8859-3)
+ "Latin-3" '((charset iso-8859-3)
(coding-system iso-latin-3)
(coding-priority iso-latin-3)
- (nonascii-translation . latin-iso8859-3)
+ (nonascii-translation . iso-8859-3)
(unibyte-syntax . "latin-3")
(unibyte-display . iso-latin-3)
(input-method . "latin-3-prefix")
\f
;; Latin-4 (ISO-8859-4)
-(make-coding-system
- 'iso-latin-4 2 ?4
- "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)."
- '(ascii latin-iso8859-4 nil nil
- nil nil nil nil nil nil nil)
- '((safe-charsets ascii latin-iso8859-4)
- (mime-charset . iso-8859-4)))
+(define-coding-system 'iso-latin-4
+ "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)."
+ :coding-type 'charset
+ :mnemonic ?4
+ :charset-list '(iso-8859-4)
+ :plist '(mime-charset iso-8859-4))
(define-coding-system-alias 'iso-8859-4 'iso-latin-4)
(define-coding-system-alias 'latin-4 'iso-latin-4)
(set-language-info-alist
- "Latin-4" '((charset ascii latin-iso8859-4)
+ "Latin-4" '((charset iso-8859-4)
(coding-system iso-8859-4)
(coding-priority iso-8859-4)
- (nonascii-translation . latin-iso8859-4)
+ (nonascii-translation . iso-8859-4)
(unibyte-syntax . "latin-4")
(unibyte-display . iso-8859-4)
(input-method . "latin-4-postfix")
\f
;; Latin-5 (ISO-8859-9)
-(make-coding-system
- 'iso-latin-5 2 ?9
- "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)."
- '(ascii latin-iso8859-9 nil nil
- nil nil nil nil nil nil nil)
- '((safe-charsets ascii latin-iso8859-9)
- (mime-charset . iso-8859-9)))
+(define-coding-system 'iso-latin-5
+ "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)."
+ :coding-type 'charset
+ :mnemonic ?9
+ :charset-list '(iso-8859-9)
+ :plist '(mime-charset iso-8859-9))
(define-coding-system-alias 'iso-8859-9 'iso-latin-5)
(define-coding-system-alias 'latin-5 'iso-latin-5)
(set-language-info-alist
- "Latin-5" '((charset ascii latin-iso8859-9)
+ "Latin-5" '((charset iso-8859-9)
(coding-system iso-latin-5)
(coding-priority iso-latin-5)
- (nonascii-translation . latin-iso8859-9)
+ (nonascii-translation . iso-8859-9)
(unibyte-syntax . "latin-5")
(unibyte-display . iso-latin-5)
(input-method . "latin-5-postfix")
\f
;; Latin-8 (ISO-8859-14)
-(make-coding-system
- 'iso-latin-8 2 ?W ; `W' for `Welsh', since `C'
- ; for `Celtic' is taken.
- "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)."
- '(ascii latin-iso8859-14 nil nil
- nil nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii latin-iso8859-14)
- (mime-charset . iso-8859-14)))
+(define-coding-system 'iso-latin-8
+ "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)."
+ :coding-type 'charset
+ ;; `W' for `Welsh', since `C' for `Celtic' is taken.
+ :mnemonic ?W
+ :charset-list '(iso-8859-14)
+ :plist '(mime-charset iso-8859-14))
(define-coding-system-alias 'iso-8859-14 'iso-latin-8)
(define-coding-system-alias 'latin-8 'iso-latin-8)
(set-language-info-alist
- "Latin-8" '((charset ascii latin-iso8859-14)
+ "Latin-8" '((charset iso-8859-14)
(coding-system iso-latin-8)
(coding-priority iso-latin-8)
- (nonascii-translation . latin-iso8859-14)
+ (nonascii-translation . iso-8859-14)
(unibyte-syntax . "latin-8")
(unibyte-display . iso-latin-8)
(input-method . "latin-8-prefix")
\f
;; Latin-9 (ISO-8859-15)
-(make-coding-system
- 'iso-latin-9 2 ?0 ; `0' for `Latin-0'
- "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)."
- '(ascii latin-iso8859-15 nil nil
- nil nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii latin-iso8859-15)
- (mime-charset . iso-8859-15)))
+(define-coding-system 'iso-latin-9
+ "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)."
+ :coding-type 'charset
+ ;; `0' for `Latin-0'
+ :mnemonic ?0
+ :charset-list '(iso-8859-15)
+ :plist '(mime-charset iso-8859-15))
(define-coding-system-alias 'iso-8859-15 'iso-latin-9)
(define-coding-system-alias 'latin-9 'iso-latin-9)
(define-coding-system-alias 'latin-0 'iso-latin-9)
(set-language-info-alist
- "Latin-9" '((charset ascii latin-iso8859-15)
+ "Latin-9" '((charset iso-8859-15)
(coding-system iso-latin-9)
(coding-priority iso-latin-9)
- (nonascii-translation . latin-iso8859-15)
+ (nonascii-translation . iso-8859-15)
(unibyte-syntax . "latin-9")
(unibyte-display . iso-latin-9)
(input-method . "latin-9-prefix")
\f
(set-language-info-alist
"German" '((tutorial . "TUTORIAL.de")
- (charset ascii latin-iso8859-1)
+ (charset iso-8859-1)
(coding-system iso-latin-1)
(coding-priority iso-latin-1)
+ (nonascii-translation . iso-8859-1)
(input-method . "german-postfix")
- (nonascii-translation . iso-latin-1)
(unibyte-syntax . "latin-1")
(unibyte-display . iso-latin-1)
(sample-text . "\
(set-language-info-alist
"French" '((tutorial . "TUTORIAL.fr")
- (charset ascii latin-iso8859-1)
+ (charset iso-8859-1)
(coding-system iso-latin-1)
(coding-priority iso-latin-1)
- (nonascii-translation . latin-iso8859-1)
+ (nonascii-translation . iso-8859-1)
(unibyte-syntax . "latin-1")
(unibyte-display . iso-latin-1)
(input-method . "latin-1-prefix")
'("European"))
(set-language-info-alist
- "Slovenian" '((charset . (ascii latin-iso8859-2))
+ "Slovenian" '((charset iso-8859-2)
(coding-system . (iso-8859-2))
(coding-priority . (iso-8859-2))
- (nonascii-translation . latin-iso8859-2)
+ (nonascii-translation . iso-8859-2)
(input-method . "latin-2-postfix")
(unibyte-syntax . "latin-2")
(unibyte-display . iso-8859-2)
(set-language-info-alist
"Spanish" '((tutorial . "TUTORIAL.es")
- (charset ascii latin-iso8859-1)
+ (charset iso-8859-1)
(coding-system iso-latin-1)
(coding-priority iso-latin-1)
+ (nonascii-translation . iso-8859-1)
(input-method . "spanish-postfix")
- (nonascii-translation . iso-latin-1)
(unibyte-syntax . "latin-1")
(unibyte-display . iso-latin-1)
(sample-text . "Spanish (Espa\e,Aq\e(Bol) \e,A!\e(BHola!")
(set-language-info-alist
"Dutch" '((tutorial . "TUTORIAL.nl")
- (charset ascii latin-iso8859-1)
+ (charset iso-8859-1)
(coding-system iso-latin-1)
(coding-priority iso-latin-1)
- (nonascii-translation . iso-latin-1)
+ (nonascii-translation . iso-8859-1)
(unibyte-syntax . "latin-1")
(unibyte-display . iso-latin-1)
(sample-text . "Er is een aantal manieren waarop je dit kan doen")
;; "Latin-3" language environment.
(set-language-info-alist
- "Turkish" '((charset ascii latin-iso8859-9)
+ "Turkish" '((charset iso-8859-9)
(coding-system iso-latin-5)
(coding-priority iso-latin-5)
- (nonascii-translation . latin-iso8859-9)
+ (nonascii-translation . iso-8859-9)
(unibyte-syntax . "latin-5")
(unibyte-display . iso-latin-5)
(input-method . "turkish-postfix")
;; Keywords: multilingual, Polish
(set-language-info-alist
- "Polish" '((charset . (ascii latin-iso8859-2))
+ "Polish" '((charset . (iso-8859-2))
(coding-system . (iso-8859-2))
(coding-priority . (iso-8859-2))
+ (nonascii-translation . iso-8859-2)
(input-method . "polish-slash")
- (nonascii-translation . latin-iso8859-2)
(unibyte-syntax . "latin-2")
(unibyte-display . iso-8859-2)
(tutorial . "TUTORIAL.pl")
(set-language-info-alist
"Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based
(coding-priority utf-8 latin-8)
+ (nonascii-translation . iso-8859-14)
(input-method . "welsh")
(documentation . "Support for Welsh, using Unicode."))
'("European"))
(set-language-info-alist
"Latin-7" `((coding-system latin-7)
(coding-priority latin-7)
+ (nonascii-translation . iso-8859-13)
;; Fixme: input-method
(features code-pages)
(documentation . "Support for Latin-7, e.g. Latvian, Lithuanian."))
(set-language-info-alist
"Lithuanian" `((coding-system latin-7)
(coding-priority latin-7)
+ (nonascii-translation . iso-8859-13)
(input-method . "lithuanian-keyboard")
(features code-pages)
(documentation . "Support for Lithuanian."))
(set-language-info-alist
"Latvian" `((coding-system latin-7)
(coding-priority latin-7)
+ (nonascii-translation . iso-8859-13)
(input-method . "latvian-keyboard")
(features code-pages)
(documentation . "Support for Latvian."))
'("European"))
+
\f
-;; Definitions for the Mac Roman character sets and coding system.
-;; The Mac Roman encoding uses all 128 code points in the range 128 to
-;; 255 for actual characters. Emacs decodes them to one of the
-;; following character sets.
-;; ascii, latin-iso8859-1, mule-unicode-0100-24ff,
-;; mule-unicode-2500-33ff, mule-unicode-e000-ffff
-
-(let
- ((encoding-vector (make-vector 256 nil))
- (i 0)
- (vec ;; mac-roman (128..255) -> UCS mapping
- [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS
- #x00C5 ;; 129:LATIN CAPITAL LETTER A WITH RING ABOVE
- #x00C7 ;; 130:LATIN CAPITAL LETTER C WITH CEDILLA
- #x00C9 ;; 131:LATIN CAPITAL LETTER E WITH ACUTE
- #x00D1 ;; 132:LATIN CAPITAL LETTER N WITH TILDE
- #x00D6 ;; 133:LATIN CAPITAL LETTER O WITH DIAERESIS
- #x00DC ;; 134:LATIN CAPITAL LETTER U WITH DIAERESIS
- #x00E1 ;; 135:LATIN SMALL LETTER A WITH ACUTE
- #x00E0 ;; 136:LATIN SMALL LETTER A WITH GRAVE
- #x00E2 ;; 137:LATIN SMALL LETTER A WITH CIRCUMFLEX
- #x00E4 ;; 138:LATIN SMALL LETTER A WITH DIAERESIS
- #x00E3 ;; 139:LATIN SMALL LETTER A WITH TILDE
- #x00E5 ;; 140:LATIN SMALL LETTER A WITH RING ABOVE
- #x00E7 ;; 141:LATIN SMALL LETTER C WITH CEDILLA
- #x00E9 ;; 142:LATIN SMALL LETTER E WITH ACUTE
- #x00E8 ;; 143:LATIN SMALL LETTER E WITH GRAVE
- #x00EA ;; 144:LATIN SMALL LETTER E WITH CIRCUMFLEX
- #x00EB ;; 145:LATIN SMALL LETTER E WITH DIAERESIS
- #x00ED ;; 146:LATIN SMALL LETTER I WITH ACUTE
- #x00EC ;; 147:LATIN SMALL LETTER I WITH GRAVE
- #x00EE ;; 148:LATIN SMALL LETTER I WITH CIRCUMFLEX
- #x00EF ;; 149:LATIN SMALL LETTER I WITH DIAERESIS
- #x00F1 ;; 150:LATIN SMALL LETTER N WITH TILDE
- #x00F3 ;; 151:LATIN SMALL LETTER O WITH ACUTE
- #x00F2 ;; 152:LATIN SMALL LETTER O WITH GRAVE
- #x00F4 ;; 153:LATIN SMALL LETTER O WITH CIRCUMFLEX
- #x00F6 ;; 154:LATIN SMALL LETTER O WITH DIAERESIS
- #x00F5 ;; 155:LATIN SMALL LETTER O WITH TILDE
- #x00FA ;; 156:LATIN SMALL LETTER U WITH ACUTE
- #x00F9 ;; 157:LATIN SMALL LETTER U WITH GRAVE
- #x00FB ;; 158:LATIN SMALL LETTER U WITH CIRCUMFLEX
- #x00FC ;; 159:LATIN SMALL LETTER U WITH DIAERESIS
- #x2020 ;; 160:DAGGER
- #x00B0 ;; 161:DEGREE SIGN
- #x00A2 ;; 162:CENT SIGN
- #x00A3 ;; 163:POUND SIGN
- #x00A7 ;; 164:SECTION SIGN
- #x2022 ;; 165:BULLET
- #x00B6 ;; 166:PILCROW SIGN
- #x00DF ;; 167:LATIN SMALL LETTER SHARP S
- #x00AE ;; 168:REGISTERED SIGN
- #x00A9 ;; 169:COPYRIGHT SIGN
- #x2122 ;; 170:TRADE MARK SIGN
- #x00B4 ;; 171:ACUTE ACCENT
- #x00A8 ;; 172:DIAERESIS
- #x2260 ;; 173:NOT EQUAL TO
- #x00C6 ;; 174:LATIN CAPITAL LETTER AE
- #x00D8 ;; 175:LATIN CAPITAL LETTER O WITH STROKE
- #x221E ;; 176:INFINITY
- #x00B1 ;; 177:PLUS-MINUS SIGN
- #x2264 ;; 178:LESS-THAN OR EQUAL TO
- #x2265 ;; 179:GREATER-THAN OR EQUAL TO
- #x00A5 ;; 180:YEN SIGN
- #x00B5 ;; 181:MICRO SIGN
- #x2202 ;; 182:PARTIAL DIFFERENTIAL
- #x2211 ;; 183:N-ARY SUMMATION
- #x220F ;; 184:N-ARY PRODUCT
- #x03C0 ;; 185:GREEK SMALL LETTER PI
- #x222B ;; 186:INTEGRAL
- #x00AA ;; 187:FEMININE ORDINAL INDICATOR
- #x00BA ;; 188:MASCULINE ORDINAL INDICATOR
- #x03A9 ;; 189:GREEK CAPITAL LETTER OMEGA
- #x00E6 ;; 190:LATIN SMALL LETTER AE
- #x00F8 ;; 191:LATIN SMALL LETTER O WITH STROKE
- #x00BF ;; 192:INVERTED QUESTION MARK
- #x00A1 ;; 193:INVERTED EXCLAMATION MARK
- #x00AC ;; 194:NOT SIGN
- #x221A ;; 195:SQUARE ROOT
- #x0192 ;; 196:LATIN SMALL LETTER F WITH HOOK
- #x2248 ;; 197:ALMOST EQUAL TO
- #x2206 ;; 198:INCREMENT
- #x00AB ;; 199:LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
- #x00BB ;; 200:RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
- #x2026 ;; 201:HORIZONTAL ELLIPSIS
- #x00A0 ;; 202:NO-BREAK SPACE
- #x00C0 ;; 203:LATIN CAPITAL LETTER A WITH GRAVE
- #x00C3 ;; 204:LATIN CAPITAL LETTER A WITH TILDE
- #x00D5 ;; 205:LATIN CAPITAL LETTER O WITH TILDE
- #x0152 ;; 206:LATIN CAPITAL LIGATURE OE
- #x0153 ;; 207:LATIN SMALL LIGATURE OE
- #x2013 ;; 208:EN DASH
- #x2014 ;; 209:EM DASH
- #x201C ;; 210:LEFT DOUBLE QUOTATION MARK
- #x201D ;; 211:RIGHT DOUBLE QUOTATION MARK
- #x2018 ;; 212:LEFT SINGLE QUOTATION MARK
- #x2019 ;; 213:RIGHT SINGLE QUOTATION MARK
- #x00F7 ;; 214:DIVISION SIGN
- #x25CA ;; 215:LOZENGE
- #x00FF ;; 216:LATIN SMALL LETTER Y WITH DIAERESIS
- #x0178 ;; 217:LATIN CAPITAL LETTER Y WITH DIAERESIS
- #x2044 ;; 218:FRACTION SLASH
- #x20AC ;; 219:EURO SIGN
- #x2039 ;; 220:SINGLE LEFT-POINTING ANGLE QUOTATION MARK
- #x203A ;; 221:SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
- #xFB01 ;; 222:LATIN SMALL LIGATURE FI
- #xFB02 ;; 223:LATIN SMALL LIGATURE FL
- #x2021 ;; 224:DOUBLE DAGGER
- #x00B7 ;; 225:MIDDLE DOT
- #x201A ;; 226:SINGLE LOW-9 QUOTATION MARK
- #x201E ;; 227:DOUBLE LOW-9 QUOTATION MARK
- #x2030 ;; 228:PER MILLE SIGN
- #x00C2 ;; 229:LATIN CAPITAL LETTER A WITH CIRCUMFLEX
- #x00CA ;; 230:LATIN CAPITAL LETTER E WITH CIRCUMFLEX
- #x00C1 ;; 231:LATIN CAPITAL LETTER A WITH ACUTE
- #x00CB ;; 232:LATIN CAPITAL LETTER E WITH DIAERESIS
- #x00C8 ;; 233:LATIN CAPITAL LETTER E WITH GRAVE
- #x00CD ;; 234:LATIN CAPITAL LETTER I WITH ACUTE
- #x00CE ;; 235:LATIN CAPITAL LETTER I WITH CIRCUMFLEX
- #x00CF ;; 236:LATIN CAPITAL LETTER I WITH DIAERESIS
- #x00CC ;; 237:LATIN CAPITAL LETTER I WITH GRAVE
- #x00D3 ;; 238:LATIN CAPITAL LETTER O WITH ACUTE
- #x00D4 ;; 239:LATIN CAPITAL LETTER O WITH CIRCUMFLEX
- #xF8FF ;; 240:Apple logo
- #x00D2 ;; 241:LATIN CAPITAL LETTER O WITH GRAVE
- #x00DA ;; 242:LATIN CAPITAL LETTER U WITH ACUTE
- #x00DB ;; 243:LATIN CAPITAL LETTER U WITH CIRCUMFLEX
- #x00D9 ;; 244:LATIN CAPITAL LETTER U WITH GRAVE
- #x0131 ;; 245:LATIN SMALL LETTER DOTLESS I
- #x02C6 ;; 246:MODIFIER LETTER CIRCUMFLEX ACCENT
- #x02DC ;; 247:SMALL TILDE
- #x00AF ;; 248:MACRON
- #x02D8 ;; 249:BREVE
- #x02D9 ;; 250:DOT ABOVE
- #x02DA ;; 251:RING ABOVE
- #x00B8 ;; 252:CEDILLA
- #x02DD ;; 253:DOUBLE ACUTE ACCENT
- #x02DB ;; 254:OGONEK
- #x02C7 ;; 255:CARON
- ])
- translation-table)
- (while (< i 128)
- (aset encoding-vector i i)
- (setq i (1+ i)))
- (while (< i 256)
- (aset encoding-vector i
- (decode-char 'ucs (aref vec (- i 128))))
- (setq i (1+ i)))
- (setq translation-table
- (make-translation-table-from-vector encoding-vector))
- (define-translation-table 'mac-roman-decoder translation-table)
- (define-translation-table 'mac-roman-encoder
- (char-table-extra-slot translation-table 0)))
-
-(define-ccl-program decode-mac-roman
- `(4
- ((loop
- (read r1)
- (if (r1 < 128) ;; ASCII
- (r0 = ,(charset-id 'ascii))
- (if (r1 < 160)
- (r0 = ,(charset-id 'eight-bit-control))
- (r0 = ,(charset-id 'eight-bit-graphic))))
- (translate-character mac-roman-decoder r0 r1)
- (write-multibyte-character r0 r1)
- (repeat))))
- "CCL program to decode Mac Roman")
-
-(define-ccl-program encode-mac-roman
- `(1
- ((loop
- (read-multibyte-character r0 r1)
- (translate-character mac-roman-encoder r0 r1)
- (write-repeat r1))))
- "CCL program to encode Mac Roman")
-
-(make-coding-system
- 'mac-roman 4 ?M
- "Mac Roman Encoding (MIME:MACINTOSH)."
- '(decode-mac-roman . encode-mac-roman)
- '((safe-chars . mac-roman-encoder)
- (valid-codes (0 . 255))
- (mime-charset . macintosh))) ; per IANA, rfc1345
+(define-coding-system 'mac-roman
+ "Mac Roman Encoding (MIME:MACINTOSH)."
+ :coding-type 'charset
+ :mnemonic ?M
+ :charset-list '(mac-roman)
+ ;; per IANA, rfc1345
+ :mime-charset 'macintosh)
(defconst diacritic-composition-pattern "\\C^\\c^+")
(let ((patterns '(("\\C^\\c^+" . diacritic-composition-function))))
(let ((c #x300))
(while (<= c #x362)
- (aset composition-function-table (decode-char 'ucs c) patterns)
+ (aset composition-function-table (decode-char 'unicode c) patterns)
(setq c (1+ c)))
(setq c #x20d0)
(while (<= c #x20e3)
- (aset composition-function-table (decode-char 'ucs c) patterns)
+ (aset composition-function-table (decode-char 'unicode c) patterns)
(setq c (1+ c)))))
(provide 'european)
;;; Code:
-(make-coding-system
- 'greek-iso-8bit 2 ?7
- "ISO 2022 based 8-bit encoding for Greek (MIME:ISO-8859-7)."
- '(ascii greek-iso8859-7 nil nil
- nil nil nil nil nil nil nil)
- '((safe-charsets ascii greek-iso8859-7)
- (mime-charset . iso-8859-7)))
+(define-coding-system 'greek-iso-8bit
+ "ISO 2022 based 8-bit encoding for Greek (MIME:ISO-8859-7)."
+ :coding-type 'charset
+ :mnemonic ?7
+ :charset-list'(iso-8859-7)
+ :plist '(mime-charset iso-8859-7))
(define-coding-system-alias 'iso-8859-7 'greek-iso-8bit)
(set-language-info-alist
- "Greek" '((charset . (greek-iso8859-7))
+ "Greek" '((charset iso-8859-7)
(coding-system . (greek-iso-8bit))
(coding-priority greek-iso-8bit)
- (nonascii-translation . greek-iso8859-7)
+ (nonascii-translation . iso-8859-7)
(input-method . "greek")
(unibyte-display . greek-iso-8bit)
(documentation . t)))
;;; Code:
-(make-coding-system
- 'hebrew-iso-8bit 2 ?8
- "ISO 2022 based 8-bit encoding for Hebrew (MIME:ISO-8859-8)."
- '(ascii hebrew-iso8859-8 nil nil
- nil ascii-eol ascii-cntl nil nil nil nil nil t)
- '((safe-charsets ascii hebrew-iso8859-8)
- (mime-charset . iso-8859-8)))
+(define-coding-system 'hebrew-iso-8bit
+ "ISO 2022 based 8-bit encoding for Hebrew (MIME:ISO-8859-8)."
+ :coding-type 'charset
+ :mnemonic ?8
+ :charset-list '(iso-8859-8)
+ :plist '(mime-charset iso-8859-8))
(define-coding-system-alias 'iso-8859-8 'hebrew-iso-8bit)
(define-coding-system-alias 'iso-8859-8-i 'hebrew-iso-8bit)
(set-language-info-alist
- "Hebrew" '((charset . (hebrew-iso8859-8))
+ "Hebrew" '((charset . iso-8859-8)
(coding-priority hebrew-iso-8bit)
- (coding-system . (hebrew-iso-8bit))
- (nonascii-translation . hebrew-iso8859-8)
+ (coding-system hebrew-iso-8bit)
+ (nonascii-translation . iso-8859-8)
(input-method . "hebrew")
(unibyte-display . hebrew-iso-8bit)
(sample-text . "Hebrew \e,Hylem\e(B")
;;; Code:
-(make-coding-system
- 'in-is13194 2 ?D
- "8-bit encoding for ASCII (MSB=0) and IS13194-Devanagari (MSB=1)."
- '(ascii indian-is13194 nil nil
- nil ascii-eol)
- '((safe-charsets ascii indian-is13194)
- (post-read-conversion . in-is13194-post-read-conversion)
- (pre-write-conversion . in-is13194-pre-write-conversion)))
+(define-coding-system 'in-is13194-devanagari
+ "8-bit encoding for ASCII (MSB=0) and IS13194-Devanagari (MSB=1)."
+ :coding-type 'iso-2022
+ :mnemonic ?D
+ :designation [ascii indian-is13194 nil nil]
+ :charset-list '(ascii indian-is13194)
+ :post-read-conversion 'in-is13194-devanagari-post-read-conversion
+ :pre-write-conversion 'in-is13194-devanagari-pre-write-conversion)
+
+(define-coding-system-alias 'devanagari 'in-is13194-devanagari)
(defvar indian-script-table
'[
;;; Code:
-(make-coding-system
- 'iso-2022-jp 2 ?J
- "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)."
- '((ascii japanese-jisx0208-1978 japanese-jisx0208
- latin-jisx0201 japanese-jisx0212) nil nil nil
- short ascii-eol ascii-cntl seven)
- '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208
- latin-jisx0201 japanese-jisx0212)
- (mime-charset . iso-2022-jp)))
+(define-coding-system 'iso-2022-jp
+ "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)."
+ :coding-type 'iso-2022
+ :mnemonic ?J
+ :designation [(ascii japanese-jisx0208-1978 japanese-jisx0208
+ latin-jisx0201 japanese-jisx0212)
+ nil nil nil]
+ :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation)
+ :charset-list '(ascii japanese-jisx0208-1978 japanese-jisx0208
+ latin-jisx0201 japanese-jisx0212)
+ :plist '(mime-charset iso-2022-jp))
(define-coding-system-alias 'junet 'iso-2022-jp)
-(make-coding-system
- 'iso-2022-jp-2 2 ?J
- "ISO 2022 based 7bit encoding for CJK, Latin-1, and Greek (MIME:ISO-2022-JP-2)."
- '((ascii japanese-jisx0208-1978 japanese-jisx0208
- latin-jisx0201 japanese-jisx0212
- chinese-gb2312 korean-ksc5601) nil
- (nil latin-iso8859-1 greek-iso8859-7) nil
- short ascii-eol ascii-cntl seven nil single-shift nil nil nil init-bol)
- '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208
- latin-jisx0201 japanese-jisx0212
- chinese-gb2312 korean-ksc5601
- latin-iso8859-1 greek-iso8859-7)
- (mime-charset . iso-2022-jp-2)))
-
-(make-coding-system
- 'japanese-shift-jis 1 ?S
- "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)."
- nil
- '((safe-charsets ascii japanese-jisx0208 japanese-jisx0208-1978
- latin-jisx0201 katakana-jisx0201)
- (mime-charset . shift_jis)
- (charset-origin-alist (japanese-jisx0208 "SJIS" encode-sjis-char)
- (katakana-jisx0201 "SJIS" encode-sjis-char))))
+(define-coding-system 'iso-2022-jp-2
+ "ISO 2022 based 7bit encoding for CJK, Latin-1, Greek (MIME:ISO-2022-JP-2)."
+ :coding-type 'iso-2022
+ :mnemonic ?J
+ :designation [(ascii japanese-jisx0208-1978 japanese-jisx0208
+ latin-jisx0201 japanese-jisx0212
+ chinese-gb2312 korean-ksc5601)
+ nil
+ (nil latin-iso8859-1 greek-iso8859-7)
+ nil]
+ :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation single-shift
+ init-at-bol)
+ :charset-list '(ascii japanese-jisx0208-1978 japanese-jisx0208
+ latin-jisx0201 japanese-jisx0212
+ chinese-gb2312 korean-ksc5601
+ latin-iso8859-1 greek-iso8859-7)
+ :plist '(mime-charset iso-2022-jp-2))
+
+(define-coding-system 'japanese-shift-jis
+ "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)"
+ :coding-type 'shift-jis
+ :mnemonic ?S
+ :charset-list '(ascii katakana-jisx0201 japanese-jisx0208)
+ :plist '(mime-charset shift_jis))
(define-coding-system-alias 'shift_jis 'japanese-shift-jis)
(define-coding-system-alias 'sjis 'japanese-shift-jis)
-(make-coding-system
- 'japanese-iso-7bit-1978-irv 2 ?j
- "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman."
- '((ascii japanese-jisx0208-1978 japanese-jisx0208
- latin-jisx0201 japanese-jisx0212 katakana-jisx0201 t) nil nil nil
- short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis)
- '(ascii japanese-jisx0208-1978 japanese-jisx0208 latin-jisx0201))
+(define-coding-system 'japanese-iso-7bit-1978-irv
+ "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman."
+ :coding-type 'iso-2022
+ :mnemonic ?j
+ :designation [(latin-jisx0201 japanese-jisx0208-1978 japanese-jisx0208
+ japanese-jisx0212 katakana-jisx0201)
+ nil nil nil]
+ :flags '(short ascii-at-eol ascii-at-cntl 7-bit use-roman use-oldjis)
+ :charset-list '(latin-jisx0201 japanese-jisx0208-1978 japanese-jisx0208
+ japanese-jisx0212))
(define-coding-system-alias 'iso-2022-jp-1978-irv 'japanese-iso-7bit-1978-irv)
(define-coding-system-alias 'old-jis 'japanese-iso-7bit-1978-irv)
-(make-coding-system
- 'japanese-iso-8bit 2 ?E
- "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)."
- '(ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212
- short ascii-eol ascii-cntl nil nil single-shift)
- '((safe-charsets ascii latin-jisx0201 japanese-jisx0208 japanese-jisx0208-1978
- katakana-jisx0201 japanese-jisx0212)
- (mime-charset . euc-jp)))
+(define-coding-system 'japanese-iso-8bit
+ "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)."
+ :coding-type 'iso-2022
+ :mnemonic ?E
+ :designation [ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212]
+ :flags '(short ascii-at-eol ascii-at-cntl single-shift)
+ :charset-list '(ascii latin-jisx0201 japanese-jisx0208
+ japanese-jisx0208-1978
+ katakana-jisx0201 japanese-jisx0212)
+ :plist '(mime-charset euc-jp))
(define-coding-system-alias 'euc-japan-1990 'japanese-iso-8bit)
(define-coding-system-alias 'euc-japan 'japanese-iso-8bit)
;;; Code:
-(make-coding-system
- 'korean-iso-8bit 2 ?K
- "ISO 2022 based EUC encoding for Korean KSC5601 (MIME:EUC-KR)."
- '(ascii korean-ksc5601 nil nil
- nil ascii-eol ascii-cntl)
- '((safe-charsets ascii korean-ksc5601)
- (mime-charset . euc-kr)))
+(define-coding-system 'korean-iso-8bit
+ "ISO 2022 based EUC encoding for Korean KSC5601 (MIME:EUC-KR)."
+ :coding-type 'iso-2022
+ :mnemonic ?K
+ :designation [ascii korean-ksc5601 nil nil]
+ :charset-list '(ascii korean-ksc5601)
+ :plist '(mime-charset euc-kr))
(define-coding-system-alias 'euc-kr 'korean-iso-8bit)
(define-coding-system-alias 'euc-korea 'korean-iso-8bit)
-(make-coding-system
- 'iso-2022-kr 2 ?k
- "ISO 2022 based 7-bit encoding for Korean KSC5601 (MIME:ISO-2022-KR)."
- '(ascii (nil korean-ksc5601) nil nil
- nil ascii-eol ascii-cntl seven locking-shift nil nil nil nil nil
- designation-bol)
- '((safe-charsets ascii korean-ksc5601)
- (mime-charset . iso-2022-kr)))
+(define-coding-system 'iso-2022-kr
+ "ISO 2022 based 7-bit encoding for Korean KSC5601 (MIME:ISO-2022-KR)."
+ :coding-type 'iso-2022
+ :mnemonic ?k
+ :designation [ascii (nil korean-ksc5601) nil nil]
+ :flags '(ascii-at-eol ascii-at-cntl 7-bit designation locking-shift
+ designation-bol)
+ :charset-list '(ascii korean-ksc5601)
+ :plist '(mime-charset iso-2022-kr))
(define-coding-system-alias 'korean-iso-7bit-lock 'iso-2022-kr)
;;; Code:
-(make-coding-system
- 'lao 2 ?L
- "8-bit encoding for ASCII (MSB=0) and LAO (MSB=1)."
- '(ascii lao nil nil
- nil nil)
- '((safe-charsets ascii lao)
- (post-read-conversion . lao-post-read-conversion)))
+(define-coding-system 'lao
+ "8-bit encoding for ASCII (MSB=0) and LAO (MSB=1)."
+ :coding-type 'charset
+ :mnemonic ?L
+ :charset-list '(lao))
(set-language-info-alist
"Lao" '((charset lao)
(coding-system lao)
(coding-priority lao)
(input-method . "lao")
- (nonascii-translation . lao)
(unibyte-display . lao)
(features lao-util)
(documentation . t)))
-(aset use-default-ascent ?\e(1;\e(B t)
-(aset use-default-ascent ?\e$,1D;\e(B t)
-(aset use-default-ascent ?\e(1=\e(B t)
-(aset use-default-ascent ?\e$,1D=\e(B t)
-(aset use-default-ascent ?\e(1?\e(B t)
-(aset use-default-ascent ?\e$,1D?\e(B t)
-(aset use-default-ascent ?\e(1B\e(B t)
-(aset use-default-ascent ?\e$,1DB\e(B t)
-(aset ignore-relative-composition ?\e(1\\e(B t)
-(aset ignore-relative-composition ?\e$,1D\\e(B t)
-
;; Register a function to compose Lao characters.
-(let ((patterns '(("\\c0\\c9?\\(\\(\\c2\\|\\c3\\)\\c4?\\|\\c4\\)?"
- . lao-composition-function))))
- (aset composition-function-table (make-char 'lao) patterns)
- (dotimes (i (1+ (- #xeff #xe80)))
- (aset composition-function-table (decode-char 'ucs (+ i #xe80)) patterns)))
+(set-char-table-range composition-function-table
+ '(#x0F00 . #x0F7F)
+ '(("\\c0\\c9?\\(\\(\\c2\\|\\c3\\)\\c4?\\|\\c4\\)?"
+ . lao-composition-function)))
(provide 'lao)
;;; Code:
-(make-coding-system
- 'thai-tis620 2 ?T
- "8-bit encoding for ASCII (MSB=0) and Thai TIS620 (MSB=1)."
- '(ascii thai-tis620 nil nil
- nil ascii-eol)
- '((safe-charsets ascii thai-tis620)
- (post-read-conversion . thai-post-read-conversion)))
+(define-coding-system 'thai-tis620
+ "8-bit encoding for ASCII (MSB=0) and Thai TIS620 (MSB=1)."
+ :coding-type 'charset
+ :mnemonic ?T
+ :charset-list '(tis620-2533))
(define-coding-system-alias 'th-tis620 'thai-tis620)
(define-coding-system-alias 'tis620 'thai-tis620)
(charset thai-tis620)
(coding-system thai-tis620)
(coding-priority thai-tis620)
- (nonascii-translation . thai-tis620)
+ (nonascii-translation . tis620-2533)
(input-method . "thai-kesmanee")
(unibyte-display . thai-tis620)
(features thai-util)
;; Register a function to compose Thai characters.
-(let ((patterns '(("\\c0\\c4\\|\\c0\\(\\c2\\|\\c3\\)\\c4?"
- . thai-composition-function))))
- (aset composition-function-table (make-char 'thai-tis620) patterns)
- (dotimes (i (1+ (- #xe7f #xe00)))
- (aset composition-function-table (decode-char 'ucs (+ i #xe00)) patterns)))
+(set-char-table-range composition-function-table
+ '(#x0E00 . #x0E7F)
+ '(("\\c0\\c4\\|\\c0\\(\\c2\\|\\c3\\)\\c4?"
+ . thai-composition-function)))
(provide 'thai)
;;;
-(make-coding-system
- 'tibetan-iso-8bit 2 ?Q
- "8-bit encoding for ASCII (MSB=0) and TIBETAN (MSB=1)."
- '(ascii tibetan nil nil
- nil nil)
- '((safe-charsets ascii tibetan)
- (post-read-conversion . tibetan-post-read-conversion)
- (pre-write-conversion . tibetan-pre-write-conversion)))
+(define-coding-system 'tibetan-iso-8bit
+ "8-bit encoding for ASCII (MSB=0) and TIBETAN (MSB=1)."
+ :coding-type 'iso-2022
+ :mnemonic ?Q
+ :designation [ascii tibetan nil nil]
+ :charset-list '(ascii tibetan))
(define-coding-system-alias 'tibetan 'tibetan-iso-8bit)
"Regexp matching a composable sequence of Tibetan characters.")
;; Register a function to compose Tibetan characters.
-(aset composition-function-table (make-char 'tibetan)
- (list (cons tibetan-composable-pattern 'tibetan-composition-function)))
+(set-char-table-range composition-function-table
+ (cons (decode-char 'tibetan #x2121)
+ (decode-char 'tibetan #x7E7E))
+ (list (cons tibetan-composable-pattern
+ 'tibetan-composition-function)))
;;;
;;; Definitions of conversion data.
;;; Code:
-(defvar viet-viscii-decode-table
- [;; VISCII is a full 8-bit code.
- 0 1 ?\e,2F\e(B 3 4 ?\e,2G\e(B ?\e,2g\e(B 7 8 9 10 11 12 13 14 15
- 16 17 18 19 ?\e,2V\e(B 21 22 23 24 ?\e,2[\e(B 26 27 28 29 ?\e,2\\e(B 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 61 62 63
- 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
- 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
- 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
- 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
- ?\e,2U\e(B ?\e,2!\e(B ?\e,2"\e(B ?\e,2#\e(B ?\e,2$\e(B ?\e,2%\e(B ?\e,2&\e(B ?\e,2'\e(B ?\e,2(\e(B ?\e,2)\e(B ?\e,2*\e(B ?\e,2+\e(B ?\e,2,\e(B ?\e,2-\e(B ?\e,2.\e(B ?\e,2/\e(B
- ?\e,20\e(B ?\e,21\e(B ?\e,22\e(B ?\e,25\e(B ?\e,2~\e(B ?\e,2>\e(B ?\e,26\e(B ?\e,27\e(B ?\e,28\e(B ?\e,2v\e(B ?\e,2w\e(B ?\e,2o\e(B ?\e,2|\e(B ?\e,2{\e(B ?\e,2x\e(B ?\e,2O\e(B
- ?\e,2u\e(B ?\e,1!\e(B ?\e,1"\e(B ?\e,1#\e(B ?\e,1$\e(B ?\e,1%\e(B ?\e,1&\e(B ?\e,1'\e(B ?\e,1(\e(B ?\e,1)\e(B ?\e,1*\e(B ?\e,1+\e(B ?\e,1,\e(B ?\e,1-\e(B ?\e,1.\e(B ?\e,1/\e(B
- ?\e,10\e(B ?\e,11\e(B ?\e,12\e(B ?\e,2^\e(B ?\e,2=\e(B ?\e,15\e(B ?\e,16\e(B ?\e,17\e(B ?\e,18\e(B ?\e,2q\e(B ?\e,2Q\e(B ?\e,2W\e(B ?\e,2X\e(B ?\e,1=\e(B ?\e,1>\e(B ?\e,2_\e(B
- ?\e,2`\e(B ?\e,2a\e(B ?\e,2b\e(B ?\e,2c\e(B ?\e,2d\e(B ?\e,2e\e(B ?\e,1F\e(B ?\e,1G\e(B ?\e,2h\e(B ?\e,2i\e(B ?\e,2j\e(B ?\e,2k\e(B ?\e,2l\e(B ?\e,2m\e(B ?\e,2n\e(B ?\e,1O\e(B
- ?\e,2p\e(B ?\e,1Q\e(B ?\e,2r\e(B ?\e,2s\e(B ?\e,2t\e(B ?\e,1U\e(B ?\e,1V\e(B ?\e,1W\e(B ?\e,1X\e(B ?\e,2y\e(B ?\e,2z\e(B ?\e,1[\e(B ?\e,1\\e(B ?\e,2}\e(B ?\e,1^\e(B ?\e,1_\e(B
- ?\e,1`\e(B ?\e,1a\e(B ?\e,1b\e(B ?\e,1c\e(B ?\e,1d\e(B ?\e,1e\e(B ?\e,1f\e(B ?\e,1g\e(B ?\e,1h\e(B ?\e,1i\e(B ?\e,1j\e(B ?\e,1k\e(B ?\e,1l\e(B ?\e,1m\e(B ?\e,1n\e(B ?\e,1o\e(B
- ?\e,1p\e(B ?\e,1q\e(B ?\e,1r\e(B ?\e,1s\e(B ?\e,1t\e(B ?\e,1u\e(B ?\e,1v\e(B ?\e,1w\e(B ?\e,1x\e(B ?\e,1y\e(B ?\e,1z\e(B ?\e,1{\e(B ?\e,1|\e(B ?\e,1}\e(B ?\e,1~\e(B ?\e,2f\e(B ]
- "Vietnamese VISCII decoding table.")
-
-(let ((table (make-translation-table-from-vector viet-viscii-decode-table)))
- (define-translation-table 'viet-viscii-nonascii-translation-table table)
- (define-translation-table 'viet-viscii-encode-table
- (char-table-extra-slot table 0)))
-
-(defvar viet-vscii-decode-table
- [;; VSCII is a full 8-bit code.
- 0 ?\e,2z\e(B ?\e,2x\e(B 3 ?\e,2W\e(B ?\e,2X\e(B ?\e,2f\e(B 7 8 9 10 11 12 13 14 15
- 16 ?\e,2Q\e(B ?\e,2_\e(B ?\e,2O\e(B ?\e,2V\e(B ?\e,2[\e(B ?\e,2}\e(B ?\e,2\\e(B 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 61 62 63
- 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
- 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
- 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
- 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
- ?\e,2`\e(B ?\e,2d\e(B ?\e,2c\e(B ?\e,2a\e(B ?\e,2U\e(B ?\e,2#\e(B ?\e,2'\e(B ?\e,2h\e(B ?\e,2k\e(B ?\e,2(\e(B ?\e,2i\e(B ?\e,2)\e(B ?\e,2.\e(B ?\e,2l\e(B ?\e,2o\e(B ?\e,2n\e(B
- ?\e,2m\e(B ?\e,28\e(B ?\e,2r\e(B ?\e,2v\e(B ?\e,2u\e(B ?\e,2s\e(B ?\e,2w\e(B ?\e,25\e(B ?\e,26\e(B ?\e,27\e(B ?\e,2^\e(B ?\e,2>\e(B ?\e,2~\e(B ?\e,2y\e(B ?\e,2|\e(B ?\e,2{\e(B
- 160 ?\e,2e\e(B ?\e,2b\e(B ?\e,2j\e(B ?\e,2t\e(B ?\e,2=\e(B ?\e,2_\e(B ?\e,2p\e(B ?\e,1e\e(B ?\e,1b\e(B ?\e,1j\e(B ?\e,1t\e(B ?\e,1=\e(B ?\e,1y\e(B ?\e,1p\e(B ?\e,2"\e(B
- 192 193 194 195 196 ?\e,1`\e(B ?\e,1d\e(B ?\e,1c\e(B ?\e,1a\e(B ?\e,1U\e(B ?\e,2F\e(B ?\e,1"\e(B ?\e,1F\e(B ?\e,1G\e(B ?\e,1!\e(B ?\e,2G\e(B
- ?\e,2!\e(B ?\e,2%\e(B ?\e,2&\e(B ?\e,2g\e(B ?\e,2%\e(B ?\e,2+\e(B ?\e,1#\e(B ?\e,1%\e(B ?\e,1&\e(B ?\e,1g\e(B ?\e,1$\e(B ?\e,1'\e(B ?\e,1h\e(B ?\e,2,\e(B ?\e,1k\e(B ?\e,1(\e(B
- ?\e,1i\e(B ?\e,1)\e(B ?\e,1+\e(B ?\e,1,\e(B ?\e,1-\e(B ?\e,1*\e(B ?\e,1.\e(B ?\e,1l\e(B ?\e,1o\e(B ?\e,2-\e(B ?\e,2*\e(B ?\e,20\e(B ?\e,1n\e(B ?\e,1m\e(B ?\e,18\e(B ?\e,1r\e(B
- ?\e,21\e(B ?\e,1v\e(B ?\e,1u\e(B ?\e,1s\e(B ?\e,1w\e(B ?\e,10\e(B ?\e,11\e(B ?\e,12\e(B ?\e,1/\e(B ?\e,15\e(B ?\e,16\e(B ?\e,17\e(B ?\e,1^\e(B ?\e,1>\e(B ?\e,1~\e(B ?\e,1y\e(B
- ?\e,22\e(B ?\e,1|\e(B ?\e,1{\e(B ?\e,1z\e(B ?\e,1x\e(B ?\e,1W\e(B ?\e,1X\e(B ?\e,1f\e(B ?\e,1Q\e(B ?\e,1q\e(B ?\e,1O\e(B ?\e,1V\e(B ?\e,1[\e(B ?\e,1}\e(B ?\e,1\\e(B ?\e,2/\e(B]
- "Vietnamese VSCII decoding table.")
-
-(let ((table (make-translation-table-from-vector viet-vscii-decode-table)))
- (define-translation-table 'viet-vscii-nonascii-translation-table table)
- (define-translation-table 'viet-vscii-encode-table
- (char-table-extra-slot table 0)))
-
-(define-ccl-program ccl-decode-viscii
- `(3
- ((loop
- (r0 = 0)
- (read r1)
- (translate-character viet-viscii-nonascii-translation-table r0 r1)
- (write-multibyte-character r0 r1)
- (repeat))))
- "CCL program to decode VISCII 1.1")
-
-(define-ccl-program ccl-encode-viscii
- `(1
- ((loop
- (read-multibyte-character r0 r1)
- (translate-character viet-viscii-encode-table r0 r1)
- (write-repeat r1))))
- "CCL program to encode VISCII 1.1")
-
-(define-ccl-program ccl-encode-viscii-font
- `(0
- ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper
- ;; R1:position code
- ;; Out: R1:font code point
- (translate-character viet-viscii-encode-table r0 r1))
- "CCL program to encode Vietnamese chars to VISCII 1.1 font")
-
-(define-ccl-program ccl-decode-vscii
- `(3
- ((loop
- (r0 = 0)
- (read r1)
- (translate-character viet-vscii-nonascii-translation-table r0 r1)
- (write-multibyte-character r0 r1)
- (repeat))))
- "CCL program to decode VSCII-1.")
-
-(define-ccl-program ccl-encode-vscii
- `(1
- ((loop
- (read-multibyte-character r0 r1)
- (translate-character viet-vscii-encode-table r0 r1)
- (write-repeat r1))))
- "CCL program to encode VSCII-1.")
-
-(define-ccl-program ccl-encode-vscii-font
- `(0
- ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper
- ;; R1:position code
- ;; Out: R1:font code point
- (translate-character viet-vscii-encode-table r0 r1))
- "CCL program to encode Vietnamese chars to VSCII-1 font.")
-
-
-(make-coding-system
- 'vietnamese-viscii 4 ?V
- "8-bit encoding for Vietnamese VISCII 1.1 (MIME:VISCII)."
- '(ccl-decode-viscii . ccl-encode-viscii)
- '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
- (mime-charset . viscii)
- (valid-codes (0 . 255))))
+(define-coding-system 'vietnamese-viscii
+ "8-bit encoding for Vietnamese VISCII 1.1 (MIME:VISCII)."
+ :coding-type 'charset
+ :mnemonic ?V
+ :charset-list '(viscii)
+ :plist '(mime-charset viscii))
(define-coding-system-alias 'viscii 'vietnamese-viscii)
-(make-coding-system
- 'vietnamese-vscii 4 ?v
- "8-bit encoding for Vietnamese VSCII-1."
- '(ccl-decode-vscii . ccl-encode-vscii)
- '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
- (valid-codes (0 . 255))))
+(define-coding-system 'vietnamese-vscii
+ "8-bit encoding for Vietnamese VSCII-1."
+ :coding-type 'charset
+ :mnemonic ?v
+ :charset-list '(vscii))
(define-coding-system-alias 'vscii 'vietnamese-vscii)
-(make-coding-system
- 'vietnamese-viqr 0 ?q
- "Encoding for Vietnamese latin transcription (VIQR)."
- nil
- '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
- (post-read-conversion . viqr-post-read-conversion)
- (pre-write-conversion . viqr-pre-write-conversion)
- (charset-origin-alist
- (vietnamese-viscii-lower "VISCII" viet-encode-viscii-char)
- (vietnamese-viscii-upper "VISCII" viet-encode-viscii-char))))
-
+(define-coding-system 'vietnamese-viqr
+ "Vietnamese latin transcription (VIQR)."
+ :coding-type 'utf-8
+ :mnemonic ?q
+ :charset-list '(ascii viscii)
+ :post-read-conversion 'viqr-post-read-conversion
+ :pre-write-conversion 'viqr-pre-write-conversion)
(define-coding-system-alias 'viqr 'vietnamese-viqr)
(cons '("vscii" . ccl-encode-vscii-font) font-ccl-encoder-alist))
(set-language-info-alist
- "Vietnamese" `((charset vietnamese-viscii-lower vietnamese-viscii-upper)
- (nonascii-translation
- . ,(get 'viet-viscii-nonascii-translation-table
- 'translation-table))
+ "Vietnamese" `((charset viscii)
(coding-system vietnamese-viscii vietnamese-vscii
vietnamese-viqr)
(coding-priority vietnamese-viscii)
+ (nonascii-translation . viscii)
(input-method . "vietnamese-viqr")
(unibyte-display . vietnamese-viscii)
(features viet-util)