comparison lisp/mule/vietnamese.el @ 418:e804706bfb8c r21-2-17

Import from CVS: tag r21-2-17
author cvs
date Mon, 13 Aug 2007 11:23:13 +0200
parents 697ef44129c6
children 95016f13131a
comparison
equal deleted inserted replaced
417:43a18b32d56e 418:e804706bfb8c
31 31
32 (eval-and-compile 32 (eval-and-compile
33 33
34 (defvar viet-viscii-decode-table 34 (defvar viet-viscii-decode-table
35 [;; VISCII is a full 8-bit code. 35 [;; VISCII is a full 8-bit code.
36 0 1 ?.2NF 3 4 ?NG ?Ng 7 8 9 10 11 12 13 14 15 36 0 1 ?,2F(B 3 4 ?,2G(B ?,2g(B 7 8 9 10 11 12 13 14 15
37 16 17 18 19 ?.2NV 21 22 23 24 ?N[ 26 27 28 29 ?N\ 31 37 16 17 18 19 ?,2V(B 21 22 23 24 ?,2[(B 26 27 28 29 ?,2\(B 31
38 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 38 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
39 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 39 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
40 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 40 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
41 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 41 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
42 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 42 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
43 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 43 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
44 ?.2NU ?N! ?N" ?N# ?N$ ?N% ?N& ?N' ?N( ?N) ?N* ?N+ ?N, ?N- ?N. ?N/ 44 ?,2U(B ?,2!(B ?,2"(B ?,2#(B ?,2$(B ?,2%(B ?,2&(B ?,2'(B ?,2((B ?,2)(B ?,2*(B ?,2+(B ?,2,(B ?,2-(B ?,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d ?Ne ?Nf ?Ng ?Nh ?Ni ?Nj ?Nk ?Nl ?Nm ?Nn ?No 50 ?,1`(B ?,1a(B ?,1b(B ?,1c(B ?,1d(B ?,1e(B ?,1f(B ?,1g(B ?,1h(B ?,1i(B ?,1j(B ?,1k(B ?,1l(B ?,1m(B ?,1n(B ?,1o(B
51 ?.1Np ?Nq ?Nr ?Ns ?Nt ?Nu ?Nv ?Nw ?Nx ?Ny ?Nz ?N{ ?N| ?N} ?N~ ?.2Nf ] 51 ?,1p(B ?,1q(B ?,1r(B ?,1s(B ?,1t(B ?,1u(B ?,1v(B ?,1w(B ?,1x(B ?,1y(B ?,1z(B ?,1{(B ?,1|(B ?,1}(B ?,1~(B ?,2f(B ]
52 "Vietnamese VISCII decoding table.") 52 "Vietnamese VISCII decoding table.")
53 53
54 (defvar viet-viscii-encode-table 54 (defvar viet-viscii-encode-table
55 (let ((table-lower (make-vector 128 0)) 55 (let ((table-lower (make-vector 128 0))
56 (table-upper (make-vector 128 0)) 56 (table-upper (make-vector 128 0))
57 (i 0) 57 (i 0)
58 char-component) 58 char-component)
59 (while (< i 256) 59 (while (< i 256)
60 (setq char-component 60 (setq char-component
61 (split-char-or-char-int (aref viet-viscii-decode-table i))) 61 (split-char (aref viet-viscii-decode-table i)))
62 (cond ((eq (car char-component) 'vietnamese-viscii-lower) 62 (cond ((eq (car char-component) 'vietnamese-viscii-lower)
63 (aset table-lower (nth 1 char-component) i)) 63 (aset table-lower (nth 1 char-component) i))
64 ((eq (car char-component) 'vietnamese-viscii-upper) 64 ((eq (car char-component) 'vietnamese-viscii-upper)
65 (aset table-upper (nth 1 char-component) i))) 65 (aset table-upper (nth 1 char-component) i)))
66 (setq i (1+ i))) 66 (setq i (1+ i)))
69 Cons of tables for encoding lower-case chars and upper-case characters. 69 Cons of tables for encoding lower-case chars and upper-case characters.
70 Both tables are indexed by the position code of Vietnamese characters.") 70 Both tables are indexed by the position code of Vietnamese characters.")
71 71
72 (defvar viet-vscii-decode-table 72 (defvar viet-vscii-decode-table
73 [;; VSCII is a full 8-bit code. 73 [;; VSCII is a full 8-bit code.
74 0 ?.2Nz ?Nx 3 ?NW ?NX ?Nf 7 8 9 10 11 12 13 14 15 74 0 ?,2z(B ?,2x(B 3 ?,2W(B ?,2X(B ?,2f(B 7 8 9 10 11 12 13 14 15
75 16 ?.2NQ ?N_ ?NO ?NV ?N[ ?N} ?N\ 24 25 26 27 28 29 30 31 75 16 ?,2Q(B ?,2_(B ?,2O(B ?,2V(B ?,2[(B ?,2}(B ?,2\(B 24 25 26 27 28 29 30 31
76 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 76 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
77 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 77 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
78 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 78 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
80 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 80 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
81 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 81 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
82 ?.2N` ?Nd ?Nc ?Na ?NU ?N# ?N' ?Nh ?Nk ?N( ?Ni ?N) ?N. ?Nl ?No ?Nn 82 ?,2`(B ?,2d(B ?,2c(B ?,2a(B ?,2U(B ?,2#(B ?,2'(B ?,2h(B ?,2k(B ?,2((B ?,2i(B ?,2)(B ?,2.(B ?,2l(B ?,2o(B ?,2n(B
83 ?.2Nm ?N8 ?Nr ?Nv ?Nu ?Ns ?Nw ?N5 ?N6 ?N7 ?N^ ?N> ?N~ ?Ny ?N| ?N{ 83 ?,2m(B ?,28(B ?,2r(B ?,2v(B ?,2u(B ?,2s(B ?,2w(B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W ?NX ?Nf ?NQ ?Nq ?NO ?NV ?N[ ?N} ?N\ ?.2N/] 89 ?,22(B ?,1|(B ?,1{(B ?,1z(B ?,1x(B ?,1W(B ?,1X(B ?,1f(B ?,1Q(B ?,1q(B ?,1O(B ?,1V(B ?,1[(B ?,1}(B ?,1\(B ?,2/(B]
90 "Vietnamese VSCII decoding table.") 90 "Vietnamese VSCII decoding table.")
91 91
92 (defvar viet-vscii-encode-table 92 (defvar viet-vscii-encode-table
93 (let ((table-lower (make-vector 128 0)) 93 (let ((table-lower (make-vector 128 0))
94 (table-upper (make-vector 128 0)) 94 (table-upper (make-vector 128 0))
95 (i 0) 95 (i 0)
96 char-component) 96 char-component)
97 (while (< i 256) 97 (while (< i 256)
98 (setq char-component 98 (setq char-component
99 (split-char-or-char-int (aref viet-vscii-decode-table i))) 99 (split-char (aref viet-vscii-decode-table i)))
100 (cond ((eq (car char-component) 'vietnamese-viscii-lower) 100 (cond ((eq (car char-component) 'vietnamese-viscii-lower)
101 (aset table-lower (nth 1 char-component) i)) 101 (aset table-lower (nth 1 char-component) i))
102 ((eq (car char-component) 'vietnamese-viscii-upper) 102 ((eq (car char-component) 'vietnamese-viscii-upper)
103 (aset table-upper (nth 1 char-component) i))) 103 (aset table-upper (nth 1 char-component) i)))
104 (setq i (1+ i))) 104 (setq i (1+ i)))
268 (set-language-info-alist 268 (set-language-info-alist
269 "Vietnamese" '((setup-function . setup-vietnamese-environment) 269 "Vietnamese" '((setup-function . setup-vietnamese-environment)
270 (charset . (vietnamese-viscii-lower 270 (charset . (vietnamese-viscii-lower
271 vietnamese-viscii-upper)) 271 vietnamese-viscii-upper))
272 (coding-system . (viscii vscii viqr)) 272 (coding-system . (viscii vscii viqr))
273 (sample-text . "Vietnamese (Ti.1N*ng ViN.t) ChN`o bNUn") 273 (sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt) Ch,1`(Bo b,1U(Bn")
274 (documentation . "\ 274 (documentation . "\
275 For Vietnamese, Emacs uses special charasets internally. 275 For Vietnamese, Emacs uses special charasets internally.
276 They can be decoded from and encoded to VISCC, VSCII, and VIQR.") 276 They can be decoded from and encoded to VISCC, VSCII, and VIQR.")
277 )) 277 ))
278 278