annotate lisp/mule/vietnamese.el @ 4062:aa22980554d9

[xemacs-hg @ 2007-07-16 12:26:00 by aidan] Do the XFree86 startup heuristics for xorg, Cygwin too.
author aidan
date Mon, 16 Jul 2007 12:26:03 +0000
parents 949ac151a10d
children aa28d959af41
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 ;;; vietnamese.el --- Support for Vietnamese -*- coding: iso-2022-7bit; -*-
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 ;; Licensed to the Free Software Foundation.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 ;; Copyright (C) 1997 MORIOKA Tomohiko
788
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 778
diff changeset
6 ;; Copyright (C) 2002 Ben Wing.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 ;; Keywords: multilingual, Vietnamese
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ;; XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ;; under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 ;; any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 ;; XEmacs is distributed in the hope that it will be useful, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 ;; General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;; along with XEmacs; see the file COPYING. If not, write to the Free
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 ;; 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 ;;; Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 ;; For Vietnames, the character sets VISCII and VSCII are supported.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 ;;; Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
33 ;; Vietnamese VISCII. VISCII is 1-byte character set which contains
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
34 ;; more than 96 characters. Since Emacs can't handle it as one
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
35 ;; character set, it is divided into two: lower case letters and upper
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
36 ;; case letters.
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
37 (make-charset 'vietnamese-viscii-lower "VISCII1.1 lower-case"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
38 '(dimension
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
39 1
3659
98af8a976fc3 [xemacs-hg @ 2006-11-05 22:31:31 by aidan]
aidan
parents: 788
diff changeset
40 registries ["VISCII1.1"]
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
41 chars 96
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
42 columns 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
43 direction l2r
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
44 final ?1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
45 graphic 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
46 short-name "VISCII lower"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
47 long-name "VISCII lower-case"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
48 ))
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
49
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
50 (make-charset 'vietnamese-viscii-upper "VISCII1.1 upper-case"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
51 '(dimension
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
52 1
3659
98af8a976fc3 [xemacs-hg @ 2006-11-05 22:31:31 by aidan]
aidan
parents: 788
diff changeset
53 registries ["VISCII1.1"]
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
54 chars 96
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
55 columns 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
56 direction l2r
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
57 final ?2
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
58 graphic 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
59 short-name "VISCII upper"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
60 long-name "VISCII upper-case"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
61 ))
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
62
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
63 (modify-syntax-entry 'vietnamese-viscii-lower "w")
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
64 (modify-syntax-entry 'vietnamese-viscii-upper "w")
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
65
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
66 (define-category ?v "Vietnamese character.")
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
67 (modify-category-entry 'vietnamese-viscii-lower ?v)
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
68 (modify-category-entry 'vietnamese-viscii-upper ?v)
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
69
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 (eval-and-compile
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 (defvar viet-viscii-decode-table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 [;; VISCII is a full 8-bit code.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 0 1 ?,2F(B 3 4 ?,2G(B ?,2g(B 7 8 9 10 11 12 13 14 15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 16 17 18 19 ?,2V(B 21 22 23 24 ?,2[(B 26 27 28 29 ?,2\(B 31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 ?,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 ?,2.(B ?,2/(B
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 ?,20(B ?,21(B ?,22(B ?,25(B ?,2~(B ?,2>(B ?,26(B ?,27(B ?,28(B ?,2v(B ?,2w(B ?,2o(B ?,2|(B ?,2{(B ?,2x(B ?,2O(B
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 ?,2u(B ?,1!(B ?,1"(B ?,1#(B ?,1$(B ?,1%(B ?,1&(B ?,1'(B ?,1((B ?,1)(B ?,1*(B ?,1+(B ?,1,(B ?,1-(B ?,1.(B ?,1/(B
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 ?,10(B ?,11(B ?,12(B ?,2^(B ?,2=(B ?,15(B ?,16(B ?,17(B ?,18(B ?,2q(B ?,2Q(B ?,2W(B ?,2X(B ?,1=(B ?,1>(B ?,2_(B
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 ?,2`(B ?,2a(B ?,2b(B ?,2c(B ?,2d(B ?,2e(B ?,1F(B ?,1G(B ?,2h(B ?,2i(B ?,2j(B ?,2k(B ?,2l(B ?,2m(B ?,2n(B ?,1O(B
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 ?,2p(B ?,1Q(B ?,2r(B ?,2s(B ?,2t(B ?,1U(B ?,1V(B ?,1W(B ?,1X(B ?,2y(B ?,2z(B ?,1[(B ?,1\(B ?,2}(B ?,1^(B ?,1_(B
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 ?,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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 ?,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 ]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 "Vietnamese VISCII decoding table.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 (defvar viet-viscii-encode-table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 (let ((table-lower (make-vector 128 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 (table-upper (make-vector 128 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 (i 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 char-component)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 (while (< i 256)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 (setq char-component
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 (split-char (aref viet-viscii-decode-table i)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 (cond ((eq (car char-component) 'vietnamese-viscii-lower)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 (aset table-lower (nth 1 char-component) i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 ((eq (car char-component) 'vietnamese-viscii-upper)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 (aset table-upper (nth 1 char-component) i)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 (setq i (1+ i)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 (cons table-lower table-upper))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 "Vietnamese VISCII encoding table.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 Cons of tables for encoding lower-case chars and upper-case characters.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 Both tables are indexed by the position code of Vietnamese characters.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 (defvar viet-vscii-decode-table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 [;; VSCII is a full 8-bit code.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 0 ?,2z(B ?,2x(B 3 ?,2W(B ?,2X(B ?,2f(B 7 8 9 10 11 12 13 14 15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 16 ?,2Q(B ?,2_(B ?,2O(B ?,2V(B ?,2[(B ?,2}(B ?,2\(B 24 25 26 27 28 29 30 31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 ?,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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 ?,2m(B ?,28(B ?,2r(B ?,2v(B ?,2u(B ?,2s(B ?,2w(B ?,25(B ?,26(B ?,27(B ?,2^(B ?,2>(B ?,2~(B ?,2y(B ?,2|(B ?,2{(B
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 160 ?,2e(B ?,2b(B ?,2j(B ?,2t(B ?,2=(B ?,2_(B ?,2p(B ?,1e(B ?,1b(B ?,1j(B ?,1t(B ?,1>(B ?,1y(B ?,1p(B ?,2"(B
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 192 193 194 195 196 ?,1`(B ?,1d(B ?,1c(B ?,1a(B ?,1U(B ?,2F(B ?,1"(B ?,1F(B ?,1G(B ?,1!(B ?,2G(B
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 ?,2!(B ?,2%(B ?,2&(B ?,2g(B ?,2%(B ?,2+(B ?,1#(B ?,1%(B ?,1&(B ?,1g(B ?,1$(B ?,1'(B ?,1h(B ?,2,(B ?,1k(B ?,1((B
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 ?,1i(B ?,1)(B ?,1+(B ?,1,(B ?,1-(B ?,1*(B ?,1.(B ?,1l(B ?,1o(B ?,2-(B ?,2*(B ?,20(B ?,1n(B ?,1m(B ?,18(B ?,1r(B
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 ?,21(B ?,1v(B ?,1u(B ?,1s(B ?,1w(B ?,10(B ?,11(B ?,12(B ?,1/(B ?,15(B ?,16(B ?,17(B ?,1^(B ?,1>(B ?,1~(B ?,1y(B
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 ?,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]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 "Vietnamese VSCII decoding table.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 (defvar viet-vscii-encode-table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 (let ((table-lower (make-vector 128 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 (table-upper (make-vector 128 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 (i 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 char-component)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 (while (< i 256)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 (setq char-component
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 (split-char (aref viet-vscii-decode-table i)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 (cond ((eq (car char-component) 'vietnamese-viscii-lower)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 (aset table-lower (nth 1 char-component) i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 ((eq (car char-component) 'vietnamese-viscii-upper)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 (aset table-upper (nth 1 char-component) i)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 (setq i (1+ i)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 (cons table-lower table-upper))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 "Vietnamese VSCII encoding table.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 Cons of tables for encoding lower-case chars and upper-case characters.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 Both tables are indexed by the position code of Vietnamese characters.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 )
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 (define-ccl-program ccl-decode-viscii
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 `(3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 ((read r0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 (loop
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 (write-read-repeat r0 ,viet-viscii-decode-table))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 ))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 "CCL program to decode VISCII 1.1")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 ;; Multibyte form of a Vietnamese character is as follows (3-byte):
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 ;; LEADING-CODE-PRIVATE-11 LEADING-CODE-EXTENDED-11 POSITION-CODE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 ;; where LEADING-CODE-EXTENDED-11 for Vietnamese is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 ;; `vietnamese-viscii-lower' or `vietnamese-viscii-upper'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 (defvar leading-code-private-11 #x9E)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 (define-ccl-program ccl-encode-viscii
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 `(1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 ((read r0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 (loop
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 (if (r0 < 128)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 ;; ASCII
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 (write-read-repeat r0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 ;; not ASCII
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 (if (r0 != ,leading-code-private-11)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 ;; not Vietnamese
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 (write-read-repeat r0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 ((read-if (r0 == ,(charset-id 'vietnamese-viscii-lower))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 (;; Vietnamese lower
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 (read r0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 (r0 -= 128)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 (write-read-repeat r0 ,(car viet-viscii-encode-table)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 (if (r0 == ,(charset-id 'vietnamese-viscii-upper))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 (;; Vietnamese upper
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 (read r0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 (r0 -= 128)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 (write-read-repeat r0 ,(cdr viet-viscii-encode-table)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 ;; not Vietnamese
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 (write-read-repeat r0)))))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 "CCL program to encode VISCII 1.1")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 (define-ccl-program ccl-encode-viscii-font
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 `(0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 ;; R1:position code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 ;; Out: R1:font code point
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 (if (r0 == ,(charset-id 'vietnamese-viscii-lower))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 (r1 = r1 ,(car viet-viscii-encode-table))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 (r1 = r1 ,(cdr viet-viscii-encode-table)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 )
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 "CCL program to encode Vietnamese chars to VISCII 1.1 font")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 (define-ccl-program ccl-decode-vscii
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 `(3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 ((read r0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 (loop
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 (write-read-repeat r0 ,viet-vscii-decode-table))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 ))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 "CCL program to decode VSCII-1.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 (define-ccl-program ccl-encode-vscii
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 `(1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 ((read r0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 (loop
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 (if (r0 < 128)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 ;; ASCII
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 (write-read-repeat r0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 ;; not ASCII
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 (if (r0 != ,leading-code-private-11)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 ;; not Vietnamese
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 (write-read-repeat r0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 (read-if (r0 == ,(charset-id 'vietnamese-viscii-lower))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 (;; Vietnamese lower
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 (read r0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 (r0 -= 128)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 (write-read-repeat r0 ,(car viet-vscii-encode-table)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 (if (r0 == ,(charset-id 'vietnamese-viscii-upper))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 (;; Vietnamese upper
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 (read r0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 (r0 -= 128)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 (write-read-repeat r0 ,(cdr viet-vscii-encode-table)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 ;; not Vietnamese
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 (write-read-repeat r0))))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 "CCL program to encode VSCII-1.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 (define-ccl-program ccl-encode-vscii-font
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 `(0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 ;; R1:position code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 ;; Out: R1:font code point
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 (if (r0 == ,(charset-id 'vietnamese-viscii-lower))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 (r1 = r1 ,(car viet-vscii-encode-table))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 (r1 = r1 ,(cdr viet-vscii-encode-table)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 )
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 "CCL program to encode Vietnamese chars to VSCII-1 font.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 (make-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 'viscii 'ccl
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
248 "VISCII 1.1 (Vietnamese)"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 `(mnemonic "VISCII"
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
250 decode ccl-decode-viscii
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
251 encode ccl-encode-viscii))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 ;; it is not correct, but XEmacs doesn't have `ccl' category...
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 (coding-system-put 'viscii 'category 'iso-8-1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 ;; (make-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 ;; 'vietnamese-viscii 4 ?V
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 ;; "8-bit encoding for Vietnamese VISCII 1.1 (MIME:VISCII)"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 ;; '(ccl-decode-viscii . ccl-encode-viscii)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 ;; (mime-charset . viscii)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 ;; (valid-codes (0 . 255))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 ;; (define-coding-system-alias 'viscii 'vietnamese-viscii)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 (make-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 'vscii 'ccl
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
268 "VSCII 1.1 (Vietnamese)"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 `(mnemonic "VSCII"
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
270 decode ccl-decode-vscii
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
271 encode ccl-encode-vscii))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 ;; (make-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 ;; 'vietnamese-vscii 4 ?v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 ;; "8-bit encoding for Vietnamese VSCII-1"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 ;; '(ccl-decode-vscii . ccl-encode-vscii)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 ;; (valid-codes (0 . 255))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 ;; (define-coding-system-alias 'vscii 'vietnamese-vscii)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 (make-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 'viqr 'no-conversion
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
284 "VIQR (Vietnamese)"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 '(mnemonic "VIQR"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 eol-type lf
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 post-read-conversion viqr-post-read-conversion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 pre-write-conversion viqr-pre-write-conversion))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 ;; (make-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 ;; 'vietnamese-viqr 0 ?q
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 ;; "Vietnamese latin transcription (VIQR)"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 ;; nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 ;; (post-read-conversion . viqr-post-read-conversion)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 ;; (pre-write-conversion . viqr-pre-write-conversion)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 ;; (charset-origin-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 ;; (vietnamese-viscii-lower "VISCII" viet-encode-viscii-char)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 ;; (vietnamese-viscii-upper "VISCII" viet-encode-viscii-char))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 ;; (define-coding-system-alias 'viqr 'vietnamese-viqr)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 ;; For VISCII users
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 (set-charset-ccl-program 'vietnamese-viscii-lower
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
305 'ccl-encode-viscii-font)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 (set-charset-ccl-program 'vietnamese-viscii-upper
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
307 'ccl-encode-viscii-font)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 ;; For VSCII users
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
309 (set-charset-ccl-program 'vietnamese-viscii-lower 'ccl-encode-vscii-font)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
310 (set-charset-ccl-program 'vietnamese-viscii-upper 'ccl-encode-vscii-font)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 ;; (setq font-ccl-encoder-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 ;; (cons (cons "viscii" ccl-encode-viscii-font) font-ccl-encoder-alist))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 ;; (setq font-ccl-encoder-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 ;; (cons (cons "vscii" ccl-encode-vscii-font) font-ccl-encoder-alist))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317
788
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 778
diff changeset
318 (defvar viet-viscii-to-external-code-table
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 778
diff changeset
319 (let ((table (make-char-table 'generic))
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 778
diff changeset
320 (i 0)
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 778
diff changeset
321 (len (length viet-viscii-decode-table)))
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 778
diff changeset
322 (while (< i len)
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 778
diff changeset
323 (let ((ch (aref viet-viscii-decode-table i)))
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 778
diff changeset
324 (if (characterp ch)
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 778
diff changeset
325 (put-char-table ch i table)))
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 778
diff changeset
326 (incf i)))
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 778
diff changeset
327 "Table to convert from characters to their VISCII code.")
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 (set-language-info-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 "Vietnamese" '((charset vietnamese-viscii-lower vietnamese-viscii-upper)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331 (coding-system viscii vscii viqr)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332 (coding-priority viscii)
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
333 (locale "vietnamese" "vi")
3970
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 3659
diff changeset
334 ;; Not available in packages.
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 3659
diff changeset
335 ;; (input-method . "vietnamese-viqr")
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336 (features viet-util)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 (sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt) Ch,1`(Bo b,1U(Bn")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 (documentation . "\
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
339 For Vietnamese, Emacs uses special charsets internally.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340 They can be decoded from and encoded to VISCC, VSCII, and VIQR.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341 Current setting put higher priority to the coding system VISCII than VSCII.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342 If you prefer VSCII, please do: (prefer-coding-system 'vietnamese-vscii)")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343 ))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345 ;;; vietnamese.el ends here