Mercurial > hg > xemacs-beta
annotate lisp/mule/tibetan.el @ 5402:308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Thu, 14 Oct 2010 17:15:20 +0200 |
parents | 949ac151a10d |
children |
rev | line source |
---|---|
778 | 1 ;;; tibetan.el --- support for Tibetan language -*- coding: iso-2022-7bit; -*- |
771 | 2 |
3 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. | |
778 | 4 ;; Copyright (C) 2002 Ben Wing. |
771 | 5 ;; Licensed to the Free Software Foundation. |
6 | |
7 ;; Keywords: multilingual, Tibetan | |
8 | |
9 ;; This file is part of XEmacs. | |
10 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3970
diff
changeset
|
11 ;; XEmacs is free software: you can redistribute it and/or modify it |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3970
diff
changeset
|
12 ;; under the terms of the GNU General Public License as published by the |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3970
diff
changeset
|
13 ;; Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3970
diff
changeset
|
14 ;; option) any later version. |
771 | 15 |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3970
diff
changeset
|
16 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3970
diff
changeset
|
17 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3970
diff
changeset
|
18 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3970
diff
changeset
|
19 ;; for more details. |
771 | 20 |
21 ;; You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3970
diff
changeset
|
22 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
771 | 23 |
778 | 24 ;;; Synched up with: Emacs 21.1 (language/tibetan.el). |
771 | 25 |
26 ;; Author: Toru TOMABECHI, <Toru.Tomabechi@orient.unil.ch> | |
27 | |
28 ;; Created: Feb. 17. 1997 | |
29 | |
30 ;; History: | |
31 ;; 1997.03.13 Modification for special signs and punctuations. | |
32 | |
778 | 33 ;;; Commentary: |
34 | |
771 | 35 ;;; Code: |
36 | |
37 ;;; Tibetan Character set. | |
38 ;;; \x2130 -- \x234a is a subset of Unicode v.2 \x0f00 - \x0fb9 | |
39 ;;; with a slight modification. And there are some subjoined | |
40 ;;; consonants which are not specified in Unicode. | |
41 ;;; I hope I can add missing characters later. | |
42 ;;; | |
43 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | |
44 ;;;2120 // $(7!!(B $(7!"(B $(7!#(B $(7!$(B $(7!%(B $(7!&(B $(7!'(B $(7!((B $(7!)(B $(7!*(B $(7!+(B $(7!,(B $(7!-(B $(7!.(B $(7!/(B ; obsolete glyphs (2123-5) | |
45 ;;;2130 $(7!0(B $(7!1(B $(7!2(B $(7!3(B $(7!4(B $(7!5(B $(7!6(B $(7!7(B $(7!8(B $(7!9(B $(7!:(B $(7!;(B $(7!<(B $(7!=(B $(7!>(B $(7!?(B ; Punctuations, | |
46 ;;;2140 $(7!@(B $(7!A(B $(7!B(B $(7!C(B $(7!D(B $(7!E(B $(7!F(B $(7!G(B $(7!H(B $(7!I(B $(7!J(B $(7!K(B $(7!L(B $(7!M(B $(7!N(B $(7!O(B ; Digits and | |
47 ;;;2150 $(7!P(B $(7!Q(B $(7!R(B $(7!S(B $(7!T(B $(7!U(B $(7!V(B $(7!W(B $(7!X(B $(7!Y(B $(7!Z(B $(7![(B $(7!\(B $(7!](B $(7!^(B $(7!_(B ; Special signs. | |
48 ;;;2160 $(7!`(B $(7!a(B $(7!b(B $(7!c(B $(7!d(B $(7!e(B $(7!f(B $(7!g(B $(7!h(B $(7!i(B $(7!j(B $(7!k(B $(7!l(B $(7!m(B $(7!n(B $(7!o(B ; | |
49 ;;;2170 $(7!p(B $(7!q(B $(7!r(B $(7!s(B $(7!t(B $(7!u(B $(7!v(B $(7!w(B $(7!x(B $(7!y(B $(7!z(B $(7!{(B $(7!|(B $(7!}(B $(7!~(B // ; | |
50 ;;; | |
51 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | |
52 ;;;2220 // $(7"!(B $(7""(B $(7"#(B $(7"$(B $(7"%(B $(7"&(B $(7"'(B $(7"((B $(7")(B $(7"*(B $(7"+(B $(7",(B $(7"-(B $(7".(B $(7"/(B ; Base consonants | |
53 ;;;2230 $(7"0(B $(7"1(B $(7"2(B $(7"3(B $(7"4(B $(7"5(B $(7"6(B $(7"7(B $(7"8(B $(7"9(B $(7":(B $(7";(B $(7"<(B $(7"=(B $(7">(B $(7"?(B ; and | |
54 ;;;2240 $(7"@(B $(7"A(B $(7"B(B $(7"C(B $(7"D(B $(7"E(B $(7"F(B $(7"G(B $(7"H(B $(7"I(B $(7"J(B $(7"K(B $(7"L(B $(7"M(B $(7"N(B $(7"O(B ; Vowel signs. | |
55 ;;;2250 $(7"P(B $(7"Q(B $(7"R(B $(7"S(B $(7"T(B $(7"U(B $(7"V(B $(7"W(B $(7"X(B $(7"Y(B $(7"Z(B $(7"[(B $(7"\(B $(7"](B $(7"^(B $(7"_(B ; (\x2251 = vowel a) | |
56 ;;;2260 $(7"`(B $(7"a(B $(7"b(B $(7"c(B $(7"d(B $(7"e(B $(7"f(B $(7"g(B $(7"h(B $(7"i(B $(7"j(B $(7"k(B $(7"l(B $(7"m(B $(7"n(B $(7"o(B ; Long vowels and | |
57 ;;;2270 $(7"p(B $(7"q(B $(7"r(B $(7"s(B $(7"t(B $(7"u(B $(7"v(B $(7"w(B $(7"x(B $(7"y(B $(7"z(B $(7"{(B $(7"|(B $(7"}(B $(7"~(B // ; vocalic r, l ARE | |
58 ;;; ; atomically | |
59 ;;; ; encoded. | |
60 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | |
61 ;;;2320 // $(7#!(B $(7#"(B $(7##(B $(7#$(B $(7#%(B $(7#&(B $(7#'(B $(7#((B $(7#)(B $(7#*(B $(7#+(B $(7#,(B $(7#-(B $(7#.(B $(7#/(B ; Subjoined consonants | |
62 ;;;2330 $(7#0(B $(7#1(B $(7#2(B $(7#3(B $(7#4(B $(7#5(B $(7#6(B $(7#7(B $(7#8(B $(7#9(B $(7#:(B $(7#;(B $(7#<(B $(7#=(B $(7#>(B $(7#?(B ; | |
63 ;;;2340 $(7#@(B $(7#A(B $(7#B(B $(7#C(B $(7#D(B $(7#E(B $(7#F(B $(7#G(B $(7#H(B $(7#I(B $(7#J(B $(7#K(B $(7#L(B $(7#M(B $(7#N(B $(7#O(B ; | |
64 ;;;2350 $(7#P(B $(7#Q(B $(7#R(B $(7#S(B $(7#T(B $(7#U(B $(7#V(B $(7#W(B $(7#X(B $(7#Y(B $(7#Z(B $(7#[(B $(7#\(B $(7#](B $(7#^(B $(7#_(B ; Hereafter, the chars | |
65 ;;;2360 $(7#`(B $(7#a(B $(7#b(B $(7#c(B $(7#d(B $(7#e(B $(7#f(B $(7#g(B $(7#h(B $(7#i(B $(7#j(B $(7#k(B $(7#l(B $(7#m(B $(7#n(B $(7#o(B ; are not specified | |
66 ;;;2370 $(7#p(B $(7#q(B $(7#r(B $(7#s(B $(7#t(B $(7#u(B $(7#v(B $(7#w(B $(7#x(B $(7#y(B $(7#z(B $(7#{(B $(7#|(B $(7#}(B $(7#~(B // ; in Unicode. | |
67 ;;; | |
68 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | |
69 ;;;2420 // $(7$!(B $(7$"(B $(7$#(B $(7$$(B $(7$%(B $(7$&(B $(7$'(B $(7$((B $(7$)(B $(7$*(B $(7$+(B $(7$,(B $(7$-(B $(7$.(B $(7$/(B ; Precomposed | |
70 ;;;2430 $(7$0(B $(7$1(B $(7$2(B $(7$3(B $(7$4(B $(7$5(B $(7$6(B $(7$7(B $(7$8(B $(7$9(B $(7$:(B $(7$;(B $(7$<(B $(7$=(B $(7$>(B $(7$?(B ; consonants for | |
71 ;;;2440 $(7$@(B $(7$A(B $(7$B(B $(7$C(B $(7$D(B $(7$E(B $(7$F(B $(7$G(B $(7$H(B $(7$I(B $(7$J(B $(7$K(B $(7$L(B $(7$M(B $(7$N(B $(7$O(B ; ordinary Tibetan. | |
72 ;;;2450 $(7$P(B $(7$Q(B $(7$R(B $(7$S(B $(7$T(B $(7$U(B $(7$V(B $(7$W(B $(7$X(B $(7$Y(B $(7$Z(B $(7$[(B $(7$\(B $(7$](B $(7$^(B $(7$_(B ; They are decomposed | |
73 ;;;2460 $(7$`(B $(7$a(B $(7$b(B $(7$c(B $(7$d(B $(7$e(B $(7$f(B $(7$g(B $(7$h(B $(7$i(B $(7$j(B $(7$k(B $(7$l(B $(7$m(B $(7$n(B $(7$o(B ; into base and | |
74 ;;;2470 $(7$p(B $(7$q(B $(7$r(B $(7$s(B $(7$t(B $(7$u(B $(7$v(B $(7$w(B $(7$x(B $(7$y(B $(7$z(B $(7${(B $(7$|(B $(7$}(B $(7$~(B // ; subjoined consonants | |
75 ;;; ; when written on a | |
76 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ; file in Tibetan | |
77 ;;;2520 // $(7%!(B $(7%"(B $(7%#(B $(7%$(B $(7%%(B $(7%&(B $(7%'(B $(7%((B $(7%)(B $(7%*(B $(7%+(B $(7%,(B $(7%-(B $(7%.(B $(7%/(B ; coding system. | |
78 ;;;2530 $(7%0(B $(7%1(B $(7%2(B $(7%3(B $(7%4(B $(7%5(B $(7%6(B $(7%7(B $(7%8(B $(7%9(B $(7%:(B $(7%;(B $(7%<(B $(7%=(B $(7%>(B $(7%?(B ; | |
79 ;;;2540 $(7%@(B $(7%A(B $(7%B(B $(7%C(B $(7%D(B $(7%E(B $(7%F(B $(7%G(B $(7%H(B $(7%I(B $(7%J(B $(7%K(B $(7%L(B $(7%M(B $(7%N(B $(7%O(B ; | |
80 ;;;2550 $(7%P(B $(7%Q(B $(7%R(B $(7%S(B $(7%T(B $(7%U(B $(7%V(B $(7%W(B $(7%X(B $(7%Y(B $(7%Z(B $(7%[(B $(7%\(B $(7%](B $(7%^(B $(7%_(B ; | |
81 ;;;2560 $(7%`(B $(7%a(B $(7%b(B $(7%c(B $(7%d(B $(7%e(B $(7%f(B $(7%g(B $(7%h(B $(7%i(B $(7%j(B $(7%k(B $(7%l(B $(7%m(B $(7%n(B $(7%o(B ; | |
82 ;;;2570 $(7%p(B $(7%q(B $(7%r(B $(7%s(B $(7%t(B $(7%u(B $(7%v(B $(7%w(B $(7%x(B $(7%y(B $(7%z(B $(7%{(B $(7%|(B $(7%}(B $(7%~(B // ; | |
83 ;;; | |
84 | |
778 | 85 (make-charset 'tibetan-1-column "Tibetan 1 column glyph" |
86 '(dimension | |
87 2 | |
3659 | 88 registries ["MuleTibetan-1"] |
778 | 89 chars 94 |
90 columns 1 | |
91 direction l2r | |
92 final ?8 | |
93 graphic 0 | |
94 short-name "Tibetan 1-col" | |
95 long-name "Tibetan 1 column" | |
96 )) | |
97 | |
98 ;; Tibetan script. | |
99 (make-charset 'tibetan "Tibetan characters" | |
100 '(dimension | |
101 2 | |
3659 | 102 registries ["MuleTibetan-2"] |
778 | 103 chars 94 |
104 columns 2 | |
105 direction l2r | |
106 final ?7 | |
107 graphic 0 | |
108 short-name "Tibetan 2-col" | |
109 long-name "Tibetan 2 column" | |
110 )) | |
771 | 111 |
112 ; (make-coding-system | |
113 ; 'tibetan-iso-8bit 2 ?Q | |
114 ; "8-bit encoding for ASCII (MSB=0) and TIBETAN (MSB=1)" | |
115 ; '(ascii tibetan nil nil | |
116 ; nil nil) | |
117 ; '((safe-charsets ascii tibetan) | |
118 ; (post-read-conversion . tibetan-post-read-conversion) | |
119 ; (pre-write-conversion . tibetan-pre-write-conversion))) | |
120 | |
121 (make-coding-system | |
122 'tibetan-iso-8bit 'iso2022 "Tibetan/8-bit" | |
123 '(charset-g0 ascii | |
124 charset-g1 tibetan | |
125 mnemonic "Tibetan" | |
126 safe-charsets (ascii tibetan) | |
127 post-read-conversion tibetan-post-read-conversion | |
128 pre-write-conversion tibetan-pre-write-conversion | |
129 documentation "8-bit encoding for ASCII (MSB=0) and TIBETAN (MSB=1)")) | |
130 | |
131 (define-coding-system-alias 'tibetan 'tibetan-iso-8bit) | |
132 | |
133 (set-language-info-alist | |
134 "Tibetan" '((charset tibetan tibetan-1-column) | |
135 (coding-system tibetan-iso-8bit) | |
136 (coding-priority iso-2022-7bit tibetan-iso-8bit) | |
3970 | 137 ;; Not available in packages. |
138 ;; (input-method . "tibetan-wylie") | |
771 | 139 (features tibet-util) |
140 (documentation . t) | |
141 (sample-text | |
142 . (tibetan-compose-string | |
143 (copy-sequence | |
144 "Tibetan (4$(7"7r'"]0"7"]14"20"21!;4%P0"G#!"Q14"20"21!;(B) $(7!4!5!5!>4"70"714$P0"!#C"Q1!;4"Er'"S0"E"S14"G0"G1!;4"70"714"2r'"[0"2"[1!;4"Dr'"[0"D"[14"#0"#14"G0"G1!>4"Ir'"]r'"_0"I"]"_1!;4"90"9"Q1!;4"/r'"S0"/"S1!;4"50"5"Q14#2x!#9r'"[0"2#9"[1!;4"Hx!"Rx!"Ur'"c0"H"A"U"c1!>(B"))))) | |
145 | |
146 | |
147 ;; `$(7"A(B' is included in the pattern for subjoined consonants because we | |
148 ;; treat it specially in tibetan-add-components. | |
149 ;; modified by Tomabechi 1999/12/10 | |
150 ;; modified by Tomabechi 2000/06/08 | |
151 ;; To allow infinite addition of vowels/modifiers | |
152 ;; as specified in Unicode v.3 | |
153 ;; $(7"A(B is removed from the class of subjoined. Tomabechi 2000/06/08 | |
154 ;; (for Unicode support) | |
155 (defconst tibetan-composable-pattern | |
156 "[$(7"!(B-$(7"J"K(B][$(7#!(B-$(7#J#K#L#M(B]*[$(7"Q"R"S(B-$(7"^"a"b"e(B]*[$(7"_"c"d"g(B-$(7"l!I!e!g(B]*" | |
157 "Regexp matching a composable sequence of Tibetan characters.") | |
158 | |
159 ;; Register a function to compose Tibetan characters. | |
778 | 160 (put-char-table 'tibetan |
161 (list (cons tibetan-composable-pattern | |
162 'tibetan-composition-function)) | |
163 composition-function-table) | |
771 | 164 |
165 ;;; | |
166 ;;; Definitions of conversion data. | |
167 ;;; | |
168 | |
169 | |
170 ;;; alists for tibetan char <-> transcription conversion | |
171 ;;; longer transcription should come first | |
172 (defconst tibetan-consonant-transcription-alist | |
173 '(("tsh" . "$(7";(B") | |
174 ("dzh" . "$(7"=(B") | |
175 ("kSH" . "$(7"J(B") | |
176 ("kh" . "$(7""(B") | |
177 ("gh" . "$(7"$(B") | |
178 ("ng" . "$(7"%(B") | |
179 ("ch" . "$(7"'(B") | |
180 ("ny" . "$(7"*(B") | |
181 ("TH" . "$(7",(B") | |
182 ("DH" . "$(7".(B") | |
183 ("th" . "$(7"1(B") | |
184 ("dh" . "$(7"3(B") | |
185 ("ph" . "$(7"6(B") | |
186 ("bh" . "$(7"8(B") | |
187 ("ts" . "$(7":(B") | |
188 ("dz" . "$(7"<(B") | |
189 ("zh" . "$(7"?(B") | |
190 ("sh" . "$(7"E(B") | |
191 ("SH" . "$(7"F(B") | |
192 ("k" . "$(7"!(B") | |
193 ("g" . "$(7"#(B") | |
194 ("c" . "$(7"&(B") | |
195 ("j" . "$(7"((B") | |
196 ("T" . "$(7"+(B") | |
197 ("D" . "$(7"-(B") | |
198 ("N" . "$(7"/(B") | |
199 ("t" . "$(7"0(B") | |
200 ("d" . "$(7"2(B") | |
201 ("n" . "$(7"4(B") | |
202 ("p" . "$(7"5(B") | |
203 ("b" . "$(7"7(B") | |
204 ("m" . "$(7"9(B") | |
205 ("w" . "$(7">(B") | |
206 ("z" . "$(7"@(B") | |
207 ("'" . "$(7"A(B") | |
208 ("y" . "$(7"B(B") | |
209 ("r" . "$(7"C(B") | |
210 ("l" . "$(7"D(B") | |
211 ("s" . "$(7"G(B") | |
212 ("h" . "$(7"H(B") | |
213 ("H" . "$(7"H(B") | |
214 ("A" . "$(7"I(B") | |
215 ;; Added by Tomabechi 1999/12/10 | |
216 ("R" . "$(7"K(B") ;; fixed form RA | |
217 )) | |
218 | |
219 | |
220 (defconst tibetan-vowel-transcription-alist | |
221 '( | |
222 ;; Composite Vowels | |
223 ;; Added by Tomabechi 2000/06/08 | |
224 ("frr" . "$(7"X(B") | |
225 ("fll" . "$(7"Z(B") | |
226 ("fa" . "$(7"R(B") | |
227 ("fi" . "$(7"T(B") | |
228 ("fu" . "$(7"V(B") | |
229 ("fr" . "$(7"W(B") | |
230 ("fl" . "$(7"Y(B") | |
231 ("fI" . "$(7"b(B") | |
232 ;; Normal Vowels | |
233 ("ai" . "$(7"\(B") | |
234 ("au" . "$(7"^(B") | |
235 ("ee" . "$(7"\(B") | |
236 ("oo" . "$(7"^(B") | |
237 ("a" . "$(7"Q(B") ; invisible vowel sign (\x2251) | |
238 ("i" . "$(7"S(B") | |
239 ("u" . "$(7"U(B") | |
240 ("e" . "$(7"[(B") | |
241 ("o" . "$(7"](B") | |
242 ("E" . "$(7"\(B") | |
243 ("O" . "$(7"^(B") | |
244 ("I" . "$(7"a(B") | |
245 ("," . "$(7"e(B") ; idem. | |
246 )) | |
247 | |
248 (defconst tibetan-modifier-transcription-alist | |
249 '(("M" . "$(7"_(B") | |
250 ("~" . "$(7"c(B") | |
251 ("`" . "$(7"d(B") | |
252 ("x" . "$(7"i(B") | |
253 ("X" . "$(7"j(B") | |
254 ("v" . "$(7"g(B") | |
255 ("V" . "$(7"h(B") | |
256 ("q" . "$(7"k(B") | |
257 ("Q" . "$(7"l(B") | |
258 ("_/" . "$(7!I(B") | |
259 ("_o" . "$(7!g(B") | |
260 ("_O" . "$(7!e(B"))) | |
261 | |
262 (defconst tibetan-precomposed-transcription-alist | |
263 '(("phyw" . "$(7$G(B") | |
264 ("tshw" . "$(7$)(B") | |
265 ("rtsw" . "$(7%.(B") | |
266 ("khw" . "$(7$"(B") | |
267 ("nyw" . "$(7$%(B") | |
268 ("tsw" . "$(7$((B") | |
269 ("zhw" . "$(7$*(B") | |
270 ("shw" . "$(7$.(B") | |
271 ("khy" . "$(7$A(B") | |
272 ("phy" . "$(7$D(B") | |
273 ("khr" . "$(7$Q(B") | |
274 ("thr" . "$(7$T(B") | |
275 ("phr" . "$(7$W(B") | |
276 ("shr" . "$(7$Z(B") | |
277 ("dzr" . "$(7$^(B") | |
278 ("grw" . "$(7$_(B") | |
279 ("rng" . "$(7%#(B") | |
280 ("rny" . "$(7%%(B") | |
281 ("rts" . "$(7%+(B") | |
282 ("rdz" . "$(7%,(B") | |
283 ("rgw" . "$(7%-(B") | |
284 ("rky" . "$(7%0(B") | |
285 ("rgy" . "$(7%1(B") | |
286 ("rmy" . "$(7%2(B") | |
287 ("lng" . "$(7%B(B") | |
288 ("sng" . "$(7%R(B") | |
289 ("sny" . "$(7%S(B") | |
290 ("sts" . "$(7%Z(B") | |
291 ("sky" . "$(7%`(B") | |
292 ("sgy" . "$(7%a(B") | |
293 ("spy" . "$(7%b(B") | |
294 ("sby" . "$(7%c(B") | |
295 ("smy" . "$(7%d(B") | |
296 ("skr" . "$(7%p(B") | |
297 ("sgr" . "$(7%q(B") | |
298 ("snr" . "$(7%r(B") | |
299 ("spr" . "$(7%s(B") | |
300 ("sbr" . "$(7%t(B") | |
301 ("smr" . "$(7%u(B") | |
302 ("kw" . "$(7$!(B") | |
303 ("gw" . "$(7$#(B") | |
304 ("cw" . "$(7$$(B") | |
305 ("tw" . "$(7$&(B") | |
306 ("dw" . "$(7$'(B") | |
307 ("zw" . "$(7$+(B") | |
308 ("rw" . "$(7$,(B") | |
309 ("lw" . "$(7$-(B") | |
310 ("sw" . "$(7$/(B") | |
311 ("hw" . "$(7$0(B") | |
312 ("ky" . "$(7$@(B") | |
313 ("gy" . "$(7$B(B") | |
314 ("py" . "$(7$C(B") | |
315 ("by" . "$(7$E(B") | |
316 ("my" . "$(7$F(B") | |
317 ("kr" . "$(7$P(B") | |
318 ("gr" . "$(7$R(B") | |
319 ("tr" . "$(7$S(B") | |
320 ("dr" . "$(7$U(B") | |
321 ("pr" . "$(7$V(B") | |
322 ("brk" . "$(7"7%!(B") | |
323 ("brg" . "$(7"7%"(B") | |
324 ("brng" . "$(7"7%#(B") | |
325 ("brj" . "$(7"7%$(B") | |
326 ("brny" . "$(7"7%%(B") | |
327 ("brt" . "$(7"7%&(B") | |
328 ("brd" . "$(7"7%'(B") | |
329 ("brn" . "$(7"7%((B") | |
330 ("brts" . "$(7"7%+(B") | |
331 ("brdz" . "$(7"7%,(B") | |
332 ("brl" . "$(7"7$d(B") | |
333 ("br" . "$(7$X(B") | |
334 ("mr" . "$(7$Y(B") | |
335 ("sr" . "$(7$[(B") | |
336 ("hr" . "$(7$\(B") | |
337 ("jr" . "$(7$](B") | |
338 ("kl" . "$(7$`(B") | |
339 ("gl" . "$(7$a(B") | |
340 ("blt" . "$(7"7%E(B") | |
341 ("bld" . "$(7"7%F(B") | |
342 ("bl" . "$(7$b(B") | |
343 ("zl" . "$(7$c(B") | |
344 ("rl" . "$(7$d(B") | |
345 ("sl" . "$(7$e(B") | |
346 ("rk" . "$(7%!(B") | |
347 ("rg" . "$(7%"(B") | |
348 ("rj" . "$(7%$(B") | |
349 ("rt" . "$(7%&(B") | |
350 ("rd" . "$(7%'(B") | |
351 ("rn" . "$(7%((B") | |
352 ("rb" . "$(7%)(B") | |
353 ("rm" . "$(7%*(B") | |
354 ("lk" . "$(7%@(B") | |
355 ("lg" . "$(7%A(B") | |
356 ("lc" . "$(7%C(B") | |
357 ("lj" . "$(7%D(B") | |
358 ("lt" . "$(7%E(B") | |
359 ("ld" . "$(7%F(B") | |
360 ("ln" . "$(7!!(B") ; dummy \x2121 | |
361 ("lp" . "$(7%G(B") | |
362 ("lb" . "$(7%H(B") | |
363 ("lh" . "$(7%I(B") | |
364 ("sk" . "$(7%P(B") | |
365 ("sg" . "$(7%Q(B") | |
366 ("st" . "$(7%T(B") | |
367 ("sd" . "$(7%U(B") | |
368 ("sn" . "$(7%V(B") | |
369 ("sp" . "$(7%W(B") | |
370 ("sb" . "$(7%X(B") | |
371 ("sm" . "$(7%Y(B")) | |
372 ) | |
373 | |
374 | |
375 (defconst tibetan-subjoined-transcription-alist | |
376 (sort '(("+k" . "$(7#!(B") | |
377 ("+kh" . "$(7#"(B") | |
378 ("+g" . "$(7##(B") | |
379 ("+gh" . "$(7#$(B") | |
380 ("+ng" . "$(7#%(B") | |
381 ("+c" . "$(7#&(B") | |
382 ("+ch" . "$(7#'(B") | |
383 ("+j" . "$(7#((B") | |
384 ("+ny" . "$(7#*(B") | |
385 ("+T" . "$(7#+(B") | |
386 ("+TH" . "$(7#,(B") | |
387 ("+D" . "$(7#-(B") | |
388 ("+DH" . "$(7#.(B") | |
389 ("+N" . "$(7#/(B") | |
390 ("+t" . "$(7#0(B") | |
391 ("+th" . "$(7#1(B") | |
392 ("+d" . "$(7#2(B") | |
393 ("+dh" . "$(7#3(B") | |
394 ("+n" . "$(7#4(B") | |
395 ("+p" . "$(7#5(B") | |
396 ("+ph" . "$(7#6(B") | |
397 ("+b" . "$(7#7(B") | |
398 ("+bh" . "$(7#8(B") | |
399 ("+m" . "$(7#9(B") | |
400 ("+ts" . "$(7#:(B") | |
401 ("+tsh" . "$(7#;(B") | |
402 ("+dz" . "$(7#<(B") | |
403 ("+dzh" . "$(7#=(B") | |
404 ("+w" . "$(7#>(B") | |
405 ("+zh" . "$(7#?(B") | |
406 ("+z" . "$(7#@(B") | |
407 ("+'" . "$(7#A(B") | |
408 ("+y" . "$(7#B(B") | |
409 ("+r" . "$(7#C(B") | |
410 ("+l" . "$(7#D(B") | |
411 ("+sh" . "$(7#E(B") | |
412 ("+SH" . "$(7#F(B") | |
413 ("+s" . "$(7#G(B") | |
414 ("+h" . "$(7#H(B") | |
415 ("+A" . "$(7#I(B") | |
416 ("+kSH" . "$(7#J(B") | |
417 ;; Added by Tomabechi 1999/12/10 | |
418 ("+W" . "$(7#K(B") ;; fixed form subscribed WA | |
419 ("+Y" . "$(7#L(B") ;; fixed form subscribed YA | |
420 ("+R" . "$(7#M(B") ;; fixed form subscribed RA | |
421 ) | |
422 (lambda (x y) (> (length (car x)) (length (car y)))))) | |
423 | |
424 ;;; | |
425 ;;; alist for Tibetan base consonant <-> subjoined consonant conversion. | |
426 ;;; | |
427 (defconst tibetan-base-to-subjoined-alist | |
428 '(("$(7"!(B" . "$(7#!(B") | |
429 ("$(7""(B" . "$(7#"(B") | |
430 ("$(7"#(B" . "$(7##(B") | |
431 ("$(7"$(B" . "$(7#$(B") | |
432 ("$(7"%(B" . "$(7#%(B") | |
433 ("$(7"&(B" . "$(7#&(B") | |
434 ("$(7"'(B" . "$(7#'(B") | |
435 ("$(7"((B" . "$(7#((B") | |
436 ("$(7"*(B" . "$(7#*(B") | |
437 ("$(7"+(B" . "$(7#+(B") | |
438 ("$(7",(B" . "$(7#,(B") | |
439 ("$(7"-(B" . "$(7#-(B") | |
440 ("$(7".(B" . "$(7#.(B") | |
441 ("$(7"/(B" . "$(7#/(B") | |
442 ("$(7"0(B" . "$(7#0(B") | |
443 ("$(7"1(B" . "$(7#1(B") | |
444 ("$(7"2(B" . "$(7#2(B") | |
445 ("$(7"3(B" . "$(7#3(B") | |
446 ("$(7"4(B" . "$(7#4(B") | |
447 ("$(7"5(B" . "$(7#5(B") | |
448 ("$(7"6(B" . "$(7#6(B") | |
449 ("$(7"7(B" . "$(7#7(B") | |
450 ("$(7"8(B" . "$(7#8(B") | |
451 ("$(7"9(B" . "$(7#9(B") | |
452 ("$(7":(B" . "$(7#:(B") | |
453 ("$(7";(B" . "$(7#;(B") | |
454 ("$(7"<(B" . "$(7#<(B") | |
455 ("$(7"=(B" . "$(7#=(B") | |
456 ("$(7">(B" . "$(7#>(B") | |
457 ("$(7"?(B" . "$(7#?(B") | |
458 ("$(7"@(B" . "$(7#@(B") | |
459 ("$(7"A(B" . "$(7#A(B") | |
460 ("$(7"B(B" . "$(7#B(B") | |
461 ("$(7"C(B" . "$(7#C(B") | |
462 ("$(7"D(B" . "$(7#D(B") | |
463 ("$(7"E(B" . "$(7#E(B") | |
464 ("$(7"F(B" . "$(7#F(B") | |
465 ("$(7"G(B" . "$(7#G(B") | |
466 ("$(7"H(B" . "$(7#H(B") | |
467 ("$(7"I(B" . "$(7#I(B") | |
468 ("$(7"J(B" . "$(7#J(B") | |
469 ;; Added by Tomabechi 1999/12/10 | |
470 ("$(7"K(B" . "$(7#M(B") ;; Fixed form RA (224B->234D) | |
471 )) | |
472 | |
473 ;;; alist for Tibetan composite vowels (long i, vocalic r, etc.) | |
474 ;;; New varialble. created by Tomabechi 2000/06/08 | |
475 (defconst tibetan-composite-vowel-alist | |
476 '(;; LONG A | |
477 ;; ("$(7"R(B" . ((bc . tc) ?$(7"R(B)) | |
478 ;; LONG I | |
479 ("$(7"T(B" . (?$(7"R(B (tc . bc) ?$(7"S(B)) | |
480 ;; LONG U | |
481 ("$(7"V(B" . (?$(7"R(B (bc . tc) ?$(7"U(B)) | |
482 ;; VOCALIC R | |
483 ("$(7"W(B" . (?$(7#C(B (tc . bc) ?$(7"a(B)) | |
484 ;; LONG VOCALIC R | |
485 ("$(7"X(B" . (?$(7#C(B (bc . tc) ?$(7"R(B (tc . bc) ?$(7"a(B)) | |
486 ;; VOCALIC L | |
487 ("$(7"Y(B" . (?$(7#D(B (tc . bc) ?$(7"a(B)) | |
488 ;;$(7!;(BLONG VOCALIC L | |
489 ("$(7"Z(B" . (?$(7#D(B (bc . tc) ?$(7"R(B (tc . bc) ?$(7"a(B)) | |
490 ;; LONG REVERSE I | |
491 ("$(7"b(B" . (?$(7"R(B (tc . bc) ?$(7"a(B)) | |
492 )) | |
493 | |
494 | |
495 | |
496 ;;; | |
497 ;;; alist for Tibetan consonantic components <-> precomposed glyph conversion. | |
498 ;;; (includes some punctuation conversion rules) | |
499 ;;; | |
500 (defconst tibetan-precomposition-rule-alist | |
501 `(("$(7"6#B#>(B" . "$(7$G(B") | |
502 ("$(7"##C#>(B" . "$(7$_(B") | |
503 ("$(7";#>(B" . "$(7$)(B") | |
504 ("$(7"C#:#>(B" . "$(7%.(B") | |
505 ("$(7"C###>(B" . "$(7%-(B") | |
506 ("$(7"C#!#B(B" . "$(7%0(B") | |
507 ("$(7"C###B(B" . "$(7%1(B") | |
508 ("$(7"C#9#B(B" . "$(7%2(B") | |
509 ("$(7"G#!#B(B" . "$(7%`(B") | |
510 ("$(7"G###B(B" . "$(7%a(B") | |
511 ("$(7"G#5#B(B" . "$(7%b(B") | |
512 ("$(7"G#7#B(B" . "$(7%c(B") | |
513 ("$(7"G#9#B(B" . "$(7%d(B") | |
514 ("$(7"G#!#C(B" . "$(7%p(B") | |
515 ("$(7"G###C(B" . "$(7%q(B") | |
516 ("$(7"G#4#C(B" . "$(7%r(B") | |
517 ("$(7"G#5#C(B" . "$(7%s(B") | |
518 ("$(7"G#7#C(B" . "$(7%t(B") | |
519 ("$(7"G#9#C(B" . "$(7%u(B") | |
520 ("$(7""#>(B" . "$(7$"(B") | |
521 ("$(7"*#>(B" . "$(7$%(B") | |
522 ("$(7":#>(B" . "$(7$((B") | |
523 ("$(7"?#>(B" . "$(7$*(B") | |
524 ("$(7"E#>(B" . "$(7$.(B") | |
525 ("$(7""#B(B" . "$(7$A(B") | |
526 ("$(7"6#B(B" . "$(7$D(B") | |
527 ("$(7""#C(B" . "$(7$Q(B") | |
528 ("$(7"1#C(B" . "$(7$T(B") | |
529 ("$(7"6#C(B" . "$(7$W(B") | |
530 ("$(7"E#C(B" . "$(7$Z(B") | |
531 ("$(7"<#C(B" . "$(7$^(B") | |
532 ("$(7"C#%(B" . "$(7%#(B") | |
533 ("$(7"C#*(B" . "$(7%%(B") | |
534 ("$(7"C#:(B" . "$(7%+(B") | |
535 ("$(7"C#<(B" . "$(7%,(B") | |
536 ("$(7"D#%(B" . "$(7%B(B") | |
537 ("$(7"G#%(B" . "$(7%R(B") | |
538 ("$(7"G#*(B" . "$(7%S(B") | |
539 ("$(7"G#:(B" . "$(7%Z(B") | |
540 ("$(7"!#>(B" . "$(7$!(B") | |
541 ("$(7"##>(B" . "$(7$#(B") | |
542 ("$(7"&#>(B" . "$(7$$(B") | |
543 ("$(7"0#>(B" . "$(7$&(B") | |
544 ("$(7"2#>(B" . "$(7$'(B") | |
545 ("$(7"@#>(B" . "$(7$+(B") | |
546 ("$(7"C#>(B" . "$(7$,(B") | |
547 ("$(7"D#>(B" . "$(7$-(B") | |
548 ("$(7"G#>(B" . "$(7$/(B") | |
549 ("$(7"H#>(B" . "$(7$0(B") | |
550 ("$(7"!#B(B" . "$(7$@(B") | |
551 ("$(7"##B(B" . "$(7$B(B") | |
552 ("$(7"5#B(B" . "$(7$C(B") | |
553 ("$(7"7#B(B" . "$(7$E(B") | |
554 ("$(7"9#B(B" . "$(7$F(B") | |
555 ("$(7"!#C(B" . "$(7$P(B") | |
556 ("$(7"##C(B" . "$(7$R(B") | |
557 ("$(7"0#C(B" . "$(7$S(B") | |
558 ("$(7"2#C(B" . "$(7$U(B") | |
559 ("$(7"5#C(B" . "$(7$V(B") | |
560 ("$(7"7#C(B" . "$(7$X(B") | |
561 ("$(7"9#C(B" . "$(7$Y(B") | |
562 ("$(7"G#C(B" . "$(7$[(B") | |
563 ("$(7"H#C(B" . "$(7$\(B") | |
564 ("$(7"(#C(B" . "$(7$](B") | |
565 ("$(7"!#D(B" . "$(7$`(B") | |
566 ("$(7"##D(B" . "$(7$a(B") | |
567 ("$(7"7#D(B" . "$(7$b(B") | |
568 ("$(7"@#D(B" . "$(7$c(B") | |
569 ("$(7"C#D(B" . "$(7$d(B") | |
570 ("$(7"G#D(B" . "$(7$e(B") | |
571 ("$(7"C#!(B" . "$(7%!(B") | |
572 ("$(7"C##(B" . "$(7%"(B") | |
573 ("$(7"C#((B" . "$(7%$(B") | |
574 ("$(7"C#0(B" . "$(7%&(B") | |
575 ("$(7"C#2(B" . "$(7%'(B") | |
576 ("$(7"C#4(B" . "$(7%((B") | |
577 ("$(7"C#7(B" . "$(7%)(B") | |
578 ("$(7"C#9(B" . "$(7%*(B") | |
579 ("$(7"D#!(B" . "$(7%@(B") | |
580 ("$(7"D##(B" . "$(7%A(B") | |
581 ("$(7"D#4(B" . "$(7!!(B") ; dummy 0x2121 added 2000/06/08 for transition l -> lng | |
582 ("$(7"D#&(B" . "$(7%C(B") | |
583 ("$(7"D#((B" . "$(7%D(B") | |
584 ("$(7"D#0(B" . "$(7%E(B") | |
585 ("$(7"D#2(B" . "$(7%F(B") | |
586 ("$(7"D#5(B" . "$(7%G(B") | |
587 ("$(7"D#7(B" . "$(7%H(B") | |
588 ("$(7"D#H(B" . "$(7%I(B") | |
589 ("$(7"G#!(B" . "$(7%P(B") | |
590 ("$(7"G##(B" . "$(7%Q(B") | |
591 ("$(7"G#0(B" . "$(7%T(B") | |
592 ("$(7"G#2(B" . "$(7%U(B") | |
593 ("$(7"G#4(B" . "$(7%V(B") | |
594 ("$(7"G#5(B" . "$(7%W(B") | |
595 ("$(7"G#7(B" . "$(7%X(B") | |
596 ("$(7"G#9(B" . "$(7%Y(B"))) | |
597 | |
598 (defconst tibetan-obsolete-glyphs | |
599 `(("$(7!=(B" . "$(8!=(B") ; 2 col <-> 1 col | |
600 ("$(7!?(B" . "$(8!?(B") | |
601 ("$(7!@(B" . "$(8!@(B") | |
602 ("$(7!A(B" . "$(8!A(B") | |
603 ("$(7"`(B" . "$(8"`(B") | |
604 ("$(7!;(B" . "$(8!;(B") | |
605 ("$(7!D(B" . "$(8!D(B") | |
606 ;; Yes these are dirty. But ... | |
607 ("$(7!>(B $(7!>(B" . ,(compose-string "$(7!>(B $(7!>(B" 0 3 [?$(7!>(B (Br . Bl) ? (Br . Bl) ?$(7!>(B])) | |
608 ("$(7!4!5!5(B" . ,(compose-string | |
609 "$(7#R#S#S#S(B" 0 4 | |
610 [?$(7#R(B (Br . Bl) ?$(7#S(B (Br . Bl) ?$(7#S(B (Br . Bl) ?$(7#S(B])) | |
611 ("$(7!4!5(B" . ,(compose-string "$(7#R#S#S(B" 0 3 [?$(7#R(B (Br . Bl) ?$(7#S(B (Br . Bl) ?$(7#S(B])) | |
612 ("$(7!6(B" . ,(compose-string "$(7#R#S!I(B" 0 3 [?$(7#R(B (Br . Bl) ?$(7#S(B (br . tr) ?$(7!I(B])) | |
613 ("$(7!4(B" . ,(compose-string "$(7#R#S(B" 0 2 [?$(7#R(B (Br . Bl) ?$(7#S(B])))) | |
614 | |
615 (defconst tibetan-regexp | |
616 (let ((l (list tibetan-precomposed-transcription-alist | |
617 tibetan-consonant-transcription-alist | |
618 tibetan-vowel-transcription-alist | |
619 tibetan-modifier-transcription-alist | |
620 tibetan-subjoined-transcription-alist)) | |
621 (separator "\\|") | |
622 tail pattern) | |
623 (while l | |
624 (setq tail (car l) l (cdr l)) | |
625 (while tail | |
626 (setq pattern (cons separator (cons (car (car tail)) pattern)) | |
627 tail (cdr tail)))) | |
628 (apply 'concat (nreverse (cdr pattern)))) | |
629 "Regexp matching a Tibetan transcription of a composable Tibetan sequence. | |
630 The result of matching is to be used for indexing alists at conversion | |
631 from a roman transcription to the corresponding Tibetan character.") | |
632 | |
633 (defvar tibetan-precomposed-regexp | |
634 (let ((l tibetan-precomposed-transcription-alist) | |
635 temp) | |
636 (setq temp "^\\(") | |
637 (setq temp | |
638 (concat temp (car (car l)))) | |
639 (setq l (cdr l)) | |
640 (while l | |
641 (setq temp | |
642 (concat temp "\\|" (car (car l)))) | |
643 (setq l (cdr l))) | |
644 (concat temp "\\)")) | |
645 "Regexp string to match a romanized Tibetan complex consonant. | |
646 The result of matching is to be used for indexing alists when the input key | |
647 from an input method is converted to the corresponding precomposed glyph.") | |
648 | |
649 (defvar tibetan-precomposition-rule-regexp | |
650 (let ((l tibetan-precomposition-rule-alist) | |
651 temp) | |
652 (setq temp "\\(") | |
653 (setq temp (concat temp (car (car l)))) | |
654 (setq l (cdr l)) | |
655 (while l | |
656 (setq temp (concat temp "\\|" (car (car l)))) | |
657 (setq l (cdr l))) | |
658 (concat temp "\\)")) | |
659 "Regexp string to match a sequence of Tibetan consonantic components, i.e., | |
660 one base consonant and one or more subjoined consonants. | |
661 The result of matching is to be used for indexing alist when the component | |
662 sequence is converted to the corresponding precomposed glyph. | |
663 This also matches some punctuation characters which need conversion.") | |
664 | |
665 (defvar tibetan-decomposed nil) | |
666 (defvar tibetan-decomposed-temp nil) | |
667 | |
668 (provide 'tibetan) | |
669 | |
778 | 670 ;;; tibetan.el ends here |