1 ;;; ind-util.el --- Transliteration and Misc. Tools for Indian Languages -*- coding: iso-2022-7bit; -*-
3 ;; Copyright (C) 2001, 2003 Free Software Foundation, Inc.
5 ;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
6 ;; Keywords: multilingual, Indian, Devanagari
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
27 ;; This file provides conversion between UCS and various
28 ;; transliteration schemes, such as ITRANS, kyoto-harvard and aiba
29 ;; methods. It also provides conversion between IS 13194 and UCS.
30 ;; Finally, this program provides the compatibility support with
31 ;; old implementation of Devanagari script.
37 ;; The followings provide the various transliteration schemes (such as
38 ;; ITRANS, kyoto-harvard, and Aiba) of Indian scripts. They are also
39 ;; used in quail/indian.el for typing Indian script in Emacs.
43 (defun indian-regexp-of-hashtbl-keys (hashtbl)
44 "Returns the regular expression of hashtable keys."
46 (maphash (lambda (key val
) (push key keys
)) hashtbl
)
49 (defvar indian-dev-base-table
52 (?
\e$
,15E
\e(B nil
) (?
\e$
,15F
\e(B ?
\e$
,15~
\e(B) (?
\e$
,15G
\e(B ?
\e$
,15\x7f\e(B) (?
\e$
,15H
\e(B ?
\e$
,16 \e(B) (?
\e$
,15I
\e(B ?
\e$
,16!\e(B) (?
\e$
,15J
\e(B ?
\e$
,16"\e(B)
53 (?\e$,15K\e(B ?\e$,16#\e(B) (?\e$,15L\e(B ?\e$,16B\e(B) (?\e$,15M\e(B ?\e$,16%\e(B) (?\e$,15N\e(B ?\e$,16&\e(B) (?\e$,15O\e(B ?\e$,16'\e(B) (?\e$,15P\e(B ?\e$,16(\e(B)
54 (?\e$,15Q\e(B ?\e$,16)\e(B) (?\e$,15R\e(B ?\e$,16*\e(B) (?\e$,15S\e(B ?\e$,16+\e(B) (?\e$,15T\e(B ?\e$,16,\e(B) (?\e$,16@\e(B ?\e$,16$\e(B) (?\e$,16A\e(B ?\e$,16C\e(B))
55 (;; CONSONANTS (currently 42, including special cases)
56 ?\e$,15U\e(B ?\e$,15V\e(B ?\e$,15W\e(B ?\e$,15X\e(B ?\e$,15Y\e(B ;; GUTTRULS
57 ?\e$,15Z\e(B ?\e$,15[\e(B ?\e$,15\\e(B ?\e$,15]\e(B ?\e$,15^\e(B ;; PALATALS
58 ?\e$,15_\e(B ?\e$,15`\e(B ?\e$,15a\e(B ?\e$,15b\e(B ?\e$,15c\e(B ;; CEREBRALS
59 ?\e$,15d\e(B ?\e$,15e\e(B ?\e$,15f\e(B ?\e$,15g\e(B ?\e$,15h\e(B ?\e$,15i\e(B ;; DENTALS
60 ?\e$,15j\e(B ?\e$,15k\e(B ?\e$,15l\e(B ?\e$,15m\e(B ?\e$,15n\e(B ;; LABIALS
61 ?\e$,15o\e(B ?\e$,15p\e(B ?\e$,15q\e(B ?\e$,15r\e(B ?\e$,15s\e(B ?\e$,15t\e(B ?\e$,15u\e(B ;; SEMIVOWELS
62 ?\e$,15v\e(B ?\e$,15w\e(B ?\e$,15x\e(B ?\e$,15y\e(B ;; SIBILANTS
63 ?\e$,168\e(B ?\e$,169\e(B ?\e$,16:\e(B ?\e$,16;\e(B ?\e$,16<\e(B ?\e$,16=\e(B ?\e$,16>\e(B ?\e$,16?\e(B ;; NUKTAS
64 "\e$
,15\
6-
5^
\e(B" "\e$
,15U6-
5w
\e(B")
66 ?\e$,15A\e(B ?\e$,15B\e(B ?\e$,15C\e(B ?\e$,15}\e(B ?\e$,16-\e(B ?\e$,160\e(B ?\e$,16D\e(B)
68 ?\e$,16F\e(B ?\e$,16G\e(B ?\e$,16H\e(B ?\e$,16I\e(B ?\e$,16J\e(B ?\e$,16K\e(B ?\e$,16L\e(B ?\e$,16M\e(B ?\e$,16N\e(B ?\e$,16O\e(B)
69 (;; Inscript-extra (4) (#, $, ^, *, ])
70 "\e$
,16-
5p
\e(B" "\e$
,15p6-
\e(B" "\e$
,15d6-5p
\e(B" "\e$
,15v6-5p
\e(B" "\e$
,15|
\e(B")))
72 ;; Punjabi is also known as Gurmukhi.
73 (defvar indian-pnj-base-table
76 (?\e$,18%\e(B nil) (?\e$,18&\e(B ?\e$,18^\e(B) (?\e$,18'\e(B ?\e$,18_\e(B) (?\e$,18(\e(B ?\e$,18`\e(B) (?\e$,18)\e(B ?\e$,18a\e(B) (?\e$,18*\e(B ?\e$,18b\e(B)
77 nil nil nil nil (?\e$,18/\e(B ?\e$,18g\e(B) (?\e$,180\e(B ?\e$,18h\e(B)
78 nil nil (?\e$,183\e(B ?\e$,18k\e(B) (?\e$,184\e(B ?\e$,18l\e(B) nil nil)
80 ?\e$,185\e(B ?\e$,186\e(B ?\e$,187\e(B ?\e$,188\e(B ?\e$,189\e(B ;; GUTTRULS
81 ?\e$,18:\e(B ?\e$,18;\e(B ?\e$,18<\e(B ?\e$,18=\e(B ?\e$,18>\e(B ;; PALATALS
82 ?\e$,18?\e(B ?\e$,18@\e(B ?\e$,18A\e(B ?\e$,18B\e(B ?\e$,18C\e(B ;; CEREBRALS
83 ?\e$,18D\e(B ?\e$,18E\e(B ?\e$,18F\e(B ?\e$,18G\e(B ?\e$,18H\e(B nil ;; DENTALS
84 ?\e$,18J\e(B ?\e$,18K\e(B ?\e$,18L\e(B ?\e$,18M\e(B ?\e$,18N\e(B ;; LABIALS
85 ?\e$,18O\e(B ?\e$,18P\e(B nil ?\e$,18R\e(B ?\e$,18S\e(B nil ?\e$,18U\e(B ;; SEMIVOWELS
86 ?\e$,18V\e(B nil ?\e$,18X\e(B ?\e$,18Y\e(B ;; SIBILANTS
87 nil ?\e$,18y\e(B ?\e$,18z\e(B ?\e$,18{\e(B ?\e$,18|\e(B nil ?\e$,18~\e(B nil ;; NUKTAS
88 "\e$
,18<8m8
>\e(B" nil)
90 nil ?\e$,18"\e(B nil nil ?
\e$
,18m
\e(B nil nil
) ;; ek onkar, etc.
92 ?
\e$
,19&\e(B ?
\e$
,19'\e(B ?
\e$
,19(\e(B ?
\e$
,19)\e(B ?
\e$
,19*\e(B ?
\e$
,19+\e(B ?
\e$
,19,\e(B ?
\e$
,19-
\e(B ?
\e$
,19.
\e(B ?
\e$
,19/\e(B)
93 (;; Inscript-extra (4) (#, $, ^, *, ])
94 "\e$,18m8P\e(B" "\e$,18P8m\e(B" "\e$,18D8m8P\e(B" "\e$,18V8m8P\e(B" "\e$,18\\e(B")))
96 (defvar indian-gjr-base-table
99 (?
\e$
,19E
\e(B nil
) (?
\e$
,19F
\e(B ?
\e$
,19~
\e(B) (?
\e$
,19G
\e(B ?
\e$
,19\x7f\e(B) (?
\e$
,19H
\e(B ?
\e$
,1: \e(B) (?
\e$
,19I
\e(B ?
\e$
,1:!\e(B) (?
\e$
,19J
\e(B ?
\e$
,1:"\e(B)
100 (?\e$,19K\e(B ?\e$,1:#\e(B) nil (?\e$,19M\e(B ?\e$,1:%\e(B) nil (?\e$,19O\e(B ?\e$,1:'\e(B) (?\e$,19P\e(B ?\e$,1:(\e(B)
101 (?\e$,19Q\e(B ?\e$,1:)\e(B) nil (?\e$,19S\e(B ?\e$,1:+\e(B) (?\e$,19T\e(B ?\e$,1:,\e(B) (?\e$,1:@\e(B ?\e$,1:$\e(B) nil)
103 ?\e$,19U\e(B ?\e$,19V\e(B ?\e$,19W\e(B ?\e$,19X\e(B ?\e$,19Y\e(B ;; GUTTRULS
104 ?\e$,19Z\e(B ?\e$,19[\e(B ?\e$,19\\e(B ?\e$,19]\e(B ?\e$,19^\e(B ;; PALATALS
105 ?\e$,19_\e(B ?\e$,19`\e(B ?\e$,19a\e(B ?\e$,19b\e(B ?\e$,19c\e(B ;; CEREBRALS
106 ?\e$,19d\e(B ?\e$,19e\e(B ?\e$,19f\e(B ?\e$,19g\e(B ?\e$,19h\e(B nil ;; DENTALS
107 ?\e$,19j\e(B ?\e$,19k\e(B ?\e$,19l\e(B ?\e$,19m\e(B ?\e$,19n\e(B ;; LABIALS
108 ?\e$,19o\e(B ?\e$,19p\e(B nil ?\e$,19r\e(B ?\e$,19s\e(B nil ?\e$,19u\e(B ;; SEMIVOWELS
109 ?\e$,19v\e(B ?\e$,19w\e(B ?\e$,19x\e(B ?\e$,19y\e(B ;; SIBILANTS
110 nil nil nil nil nil nil nil nil ;; NUKTAS
111 "\e$
,19\
:-
9^
\e(B" "\e$
,19U:-
9w
\e(B")
113 ?\e$,19A\e(B ?\e$,19B\e(B ?\e$,19C\e(B ?\e$,19}\e(B ?\e$,1:-\e(B ?\e$,1:0\e(B nil)
115 ?\e$,1:F\e(B ?\e$,1:G\e(B ?\e$,1:H\e(B ?\e$,1:I\e(B ?\e$,1:J\e(B ?\e$,1:K\e(B ?\e$,1:L\e(B ?\e$,1:M\e(B ?\e$,1:N\e(B ?\e$,1:O\e(B)
116 (;; Inscript-extra (4) (#, $, ^, *, ])
117 "\e$
,1:-
9p
\e(B" "\e$
,19p
:-
\e(B" "\e$
,19d
:-
9p
\e(B" "\e$
,19v
:-
9p
\e(B" "\e$
,19|
\e(B")))
119 (defvar indian-ori-base-table
122 (?\e$,1:e\e(B nil) (?\e$,1:f\e(B ?\e$,1;>\e(B) (?\e$,1:g\e(B ?\e$,1;?\e(B) (?\e$,1:h\e(B ?\e$,1;@\e(B) (?\e$,1:i\e(B ?\e$,1;A\e(B) (?\e$,1:j\e(B ?\e$,1;B\e(B)
123 (?\e$,1:k\e(B ?\e$,1;C\e(B) (?\e$,1:l\e(B nil) nil nil (?\e$,1:o\e(B ?\e$,1;G\e(B) (?\e$,1:p\e(B ?\e$,1;H\e(B)
124 nil nil (?\e$,1:s\e(B ?\e$,1;K\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(B")))
142 (defvar indian-bng-base-table
145 (?
\e$
,16e
\e(B nil
) (?
\e$
,16f
\e(B ?
\e$
,17>\e(B) (?
\e$
,16g
\e(B ?
\e$
,17?
\e(B) (?
\e$
,16h
\e(B ?
\e$
,17@\e(B) (?
\e$
,16i
\e(B ?
\e$
,17A
\e(B) (?
\e$
,16j
\e(B ?
\e$
,17B
\e(B)
146 (?
\e$
,16k
\e(B ?
\e$
,17C
\e(B) (?
\e$
,16l\e(B ?
\e$
,17b
\e(B) nil nil
(?
\e$
,16o
\e(B ?
\e$
,17G
\e(B) (?
\e$
,16p
\e(B ?
\e$
,17H
\e(B)
147 nil nil
(?
\e$
,16s
\e(B ?
\e$
,17K
\e(B) (?
\e$
,16t
\e(B ?
\e$
,17L\e(B) (?
\e$
,17`\e(B ?
\e$
,17D
\e(B) (?
\e$
,17a
\e(B ?
\e$
,17c
\e(B))
149 ?
\e$
,16u\e(B ?
\e$
,16v
\e(B ?
\e$
,16w
\e(B ?
\e$
,16x
\e(B ?
\e$
,16y
\e(B ;; GUTTRULS
150 ?
\e$
,16z
\e(B ?
\e$
,16{\e(B ?
\e$
,16|
\e(B ?
\e$
,16}\e(B ?
\e$
,16~
\e(B ;; PALATALS
151 ?
\e$
,16\x7f\e(B ?
\e$
,17 \e(B ?
\e$
,17!\e(B ?
\e$
,17"\e(B ?\e$,17#\e(B ;; CEREBRALS
152 ?\e$,17$\e(B ?\e$,17%\e(B ?\e$,17&\e(B ?\e$,17'\e(B ?\e$,17(\e(B nil ;; DENTALS
153 ?\e$,17*\e(B ?\e$,17+\e(B ?\e$,17,\e(B ?\e$,17-\e(B ?\e$,17.\e(B ;; LABIALS
154 ?\e$,17/\e(B ?\e$,170\e(B nil ?\e$,172\e(B nil nil nil ;; SEMIVOWELS
155 ?\e$,176\e(B ?\e$,177\e(B ?\e$,178\e(B ?\e$,179\e(B ;; SIBILANTS
156 nil nil nil nil ?\e$,17\\e(B ?\e$,17]\e(B nil ?\e$,17_\e(B ;; NUKTAS
157 "\e$
,16|
7M6~
\e(B" "\e$
,16u7M
77\e(B")
159 ?\e$,16a\e(B ?\e$,16b\e(B ?\e$,16c\e(B nil ?\e$,17M\e(B nil nil)
161 ?\e$,17f\e(B ?\e$,17g\e(B ?\e$,17h\e(B ?\e$,17i\e(B ?\e$,17j\e(B ?\e$,17k\e(B ?\e$,17l\e(B ?\e$,17m\e(B ?\e$,17n\e(B ?\e$,17o\e(B)
162 (;; Inscript-extra (4) (#, $, ^, *, ])
163 "\e$
,17M70
\e(B" "\e$
,1707M
\e(B" "\e$
,17$
7M70
\e(B" "\e$
,1767M70
\e(B" "\e$
,17<\e(B")))
165 (defvar indian-asm-base-table
168 (?\e$,16e\e(B nil) (?\e$,16f\e(B ?\e$,17>\e(B) (?\e$,16g\e(B ?\e$,17?\e(B) (?\e$,16h\e(B ?\e$,17@\e(B) (?\e$,16i\e(B ?\e$,17A\e(B) (?\e$,16j\e(B ?\e$,17B\e(B)
169 (?\e$,16k\e(B ?\e$,17C\e(B) (?\e$,16l\e(B ?\e$,17b\e(B) nil nil (?\e$,16o\e(B ?\e$,17G\e(B) (?\e$,16p\e(B ?\e$,17H\e(B)
170 nil nil (?\e$,16s\e(B ?\e$,17K\e(B) (?\e$,16t\e(B ?\e$,17L\e(B) (?\e$,17`\e(B ?\e$,17D\e(B) (?\e$,17a\e(B ?\e$,17c\e(B))
172 ?\e$,16u\e(B ?\e$,16v\e(B ?\e$,16w\e(B ?\e$,16x\e(B ?\e$,16y\e(B ;; GUTTRULS
173 ?\e$,16z\e(B ?\e$,16{\e(B ?\e$,16|\e(B ?\e$,16}\e(B ?\e$,16~\e(B ;; PALATALS
174 ?\e$,16\x7f\e(B ?\e$,17 \e(B ?\e$,17!\e(B ?\e$,17"\e(B ?
\e$
,17#\e(B ;; CEREBRALS
175 ?
\e$
,17$
\e(B ?
\e$
,17%
\e(B ?
\e$
,17&\e(B ?
\e$
,17'\e(B ?
\e$
,17(\e(B nil
;; DENTALS
176 ?
\e$
,17*\e(B ?
\e$
,17+\e(B ?
\e$
,17,\e(B ?
\e$
,17-
\e(B ?
\e$
,17.
\e(B ;; LABIALS
177 ?
\e$
,17/\e(B ?
\e$
,17p
\e(B nil ?
\e$
,172\e(B nil nil ?
\e$
,17q
\e(B ;; SEMIVOWELS
178 ?
\e$
,176\e(B ?
\e$
,177\e(B ?
\e$
,178\e(B ?
\e$
,179\e(B ;; SIBILANTS
179 nil nil nil nil ?
\e$
,17\
\e(B ?
\e$
,17]\e(B nil ?
\e$
,17_
\e(B ;; NUKTAS
180 "\e$,16|7M6~\e(B" "\e$,16u7M77\e(B")
182 ?
\e$
,16a
\e(B ?
\e$
,16b
\e(B ?
\e$
,16c
\e(B nil ?
\e$
,17M
\e(B nil nil
)
184 ?
\e$
,17f
\e(B ?
\e$
,17g
\e(B ?
\e$
,17h
\e(B ?
\e$
,17i
\e(B ?
\e$
,17j
\e(B ?
\e$
,17k
\e(B ?
\e$
,17l\e(B ?
\e$
,17m
\e(B ?
\e$
,17n
\e(B ?
\e$
,17o
\e(B)
185 (;; Inscript-extra (4) (#, $, ^, *, ])
186 "\e$,17M7p\e(B" "\e$,17p7M\e(B" "\e$,17$7M7p\e(B" "\e$,1767M7p\e(B" "\e$,17<\e(B")))
188 (defvar indian-tlg-base-table
191 (?
\e$
,1=E
\e(B nil
) (?
\e$
,1=F
\e(B ?
\e$
,1=~
\e(B) (?
\e$
,1=G
\e(B ?
\e$
,1=\x7f\e(B) (?
\e$
,1=H
\e(B ?
\e$
,1> \e(B) (?
\e$
,1=I
\e(B ?
\e$
,1>!\e(B) (?
\e$
,1=J
\e(B ?
\e$
,1>"\e(B)
192 (?\e$,1=K\e(B ?\e$,1>#\e(B) (?\e$,1=L\e(B nil) nil (?\e$,1=O\e(B ?\e$,1>'\e(B) (?\e$,1=N\e(B ?\e$,1>&\e(B) (?\e$,1=P\e(B ?\e$,1>(\e(B)
193 nil (?\e$,1=S\e(B ?\e$,1>+\e(B) (?\e$,1=R\e(B ?\e$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;; PALATALS
243 ?
\e$
,1@?
\e(B ?
\e$
,1@@\e(B ?
\e$
,1@A
\e(B ?
\e$
,1@B
\e(B ?
\e$
,1@C
\e(B ;; CEREBRALS
244 ?
\e$
,1@D
\e(B ?
\e$
,1@E
\e(B ?
\e$
,1@F
\e(B ?
\e$
,1@G
\e(B ?
\e$
,1@H
\e(B nil
;; DENTALS
245 ?
\e$
,1@J
\e(B ?
\e$
,1@K
\e(B ?
\e$
,1@L
\e(B ?
\e$
,1@M
\e(B ?
\e$
,1@N
\e(B ;; LABIALS
246 ?
\e$
,1@O
\e(B ?
\e$
,1@P
\e(B ?
\e$
,1@Q
\e(B ?
\e$
,1@R
\e(B ?
\e$
,1@S
\e(B ?
\e$
,1@T
\e(B ?
\e$
,1@U
\e(B ;; SEMIVOWELS
247 ?
\e$
,1@V
\e(B ?
\e$
,1@W
\e(B ?
\e$
,1@X
\e(B ?
\e$
,1@Y
\e(B ;; SIBILANTS
248 nil nil nil nil nil nil nil nil
;; NUKTAS
249 "\e$,1@<@m@>\e(B" "\e$,1@5@m@W\e(B")
251 nil ?
\e$
,1@"\e(B ?\e$,1@#\e(B nil ?\e$,1@m\e(B nil nil)
253 ?\e$,1A&\e(B ?\e$,1A'\e(B ?\e$,1A(\e(B ?\e$,1A)\e(B ?\e$,1A*\e(B ?\e$,1A+\e(B ?\e$,1A,\e(B ?\e$,1A-\e(B ?\e$,1A.\e(B ?\e$,1A/\e(B)
254 (;; Inscript-extra (4) (#, $, ^, *, ])
255 "\e$
,1@m
@P
\e(B" "\e$
,1@P
@m
\e(B" "\e$
,1@D
@m
@P
\e(B" "\e$
,1@V
@m
@P
\e(B" nil)))
257 (defvar indian-tml-base-table
260 (?\e$,1<%\e(B nil) (?\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<a\e(B) (?\e$,1<*\e(B ?\e$,1<b\e(B)
261 nil nil nil (?\e$,1</\e(B ?\e$,1<g\e(B) (?\e$,1<.\e(B ?\e$,1<f\e(B) (?\e$,1<0\e(B ?\e$,1<h\e(B)
262 nil (?\e$,1<3\e(B ?\e$,1<k\e(B) (?\e$,1<2\e(B ?\e$,1<j\e(B) (?\e$,1<4\e(B ?\e$,1<l\e(B) nil nil)
264 ?\e$,1<5\e(B nil nil nil ?\e$,1<9\e(B ;; GUTTRULS
265 ?\e$,1<:\e(B nil ?\e$,1<<\e(B nil ?\e$,1<>\e(B ;; PALATALS
266 ?\e$,1<?\e(B nil nil nil ?\e$,1<C\e(B ;; CEREBRALS
267 ?\e$,1<D\e(B nil nil nil ?\e$,1<H\e(B ?\e$,1<I\e(B ;; DENTALS
268 ?\e$,1<J\e(B nil nil nil ?\e$,1<N\e(B ;; LABIALS
269 ?\e$,1<O\e(B ?\e$,1<P\e(B ?\e$,1<Q\e(B ?\e$,1<R\e(B ?\e$,1<S\e(B ?\e$,1<T\e(B ?\e$,1<U\e(B ;; SEMIVOWELS
270 nil ?\e$,1<W\e(B ?\e$,1<X\e(B ?\e$,1<Y\e(B ;; SIBILANTS
271 nil nil nil nil nil nil nil nil ;; NUKTAS
272 "\e$
,1<<<m
<>\e(B" "\e$
,1<5<m
<W
\e(B")
274 nil ?\e$,1<"\e(B ?
\e$
,1<#\e(B nil ?
\e$
,1<m
\e(B nil nil
)
276 nil ?
\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)
277 (;; Inscript-extra (4) (#, $, ^, *, ])
278 "\e$,1<m<P\e(B" "\e$,1<P<m\e(B" "\e$,1<D<m<P\e(B" nil nil
)))
280 (defvar indian-base-table-to-language-alist
281 '((indian-dev-base-table .
"Devanagari")
282 (indian-pnj-base-table .
"Punjabi")
283 (indian-ori-base-table .
"Oriya")
284 (indian-bng-base-table .
"Bengali")
285 (indian-asm-base-table .
"Assamese")
286 (indian-tlg-base-table .
"Telugu")
287 (indian-knd-base-table .
"Kannada")
288 (indian-mlm-base-table .
"Malayalam")
289 (indian-tml-base-table .
"Tamil")))
291 (defvar indian-itrans-v5-table
292 '(;; for encode/decode
294 "a" ("aa" "A") "i" ("ii" "I") "u" ("uu" "U")
295 ("RRi" "R^i") ("LLi" "L^i") (".c" "e.c") "E" "e" "ai"
296 "o.c" "O" "o" "au" ("RRI" "R^I") ("LLI" "L^I"))
298 "k" "kh" "g" "gh" ("~N" "N^")
299 "ch" ("Ch" "chh") "j" "jh" ("~n" "JN")
300 "T" "Th" "D" "Dh" "N"
301 "t" "th" "d" "dh" "n" "nh"
302 "p" "ph" "b" "bh" "m"
303 "y" "r" "rh" "l" ("L" "ld") nil
("v" "w")
304 "sh" ("Sh" "shh") "s" "h"
305 "q" "K" "G" ("J" "z") ".D" ".Dh" "f" ("Y" "yh")
308 ".N" (".n" "M") "H" ".a" ".h" ("AUM" "OM") "..")))
310 (defvar indian-kyoto-harvard-table
311 '(;; for encode/decode
313 "a" ("A" "aa") "i" ("I" "ii") "u" ("U" "uu")
314 "R" ("L" "lR") nil nil
"e" "ai"
315 nil nil
"o" "au" ("q" "RR" "Q") ("E" "LL" "lRR"))
317 "k" "kh" "g" "gh" "G"
318 "c" "ch" "j" "jh" "J"
319 "T" "Th" "D" "Dh" "N"
320 "t" "th" "d" "dh" "n" nil
321 "p" "ph" "b" "bh" "m"
322 "y" "r" nil
"l" "L" nil
"v"
323 ("z" "Z") "S" "s" "h"
324 nil nil nil nil nil nil nil nil
327 nil
"M" "H" "'" nil
"." nil
)))
329 (defvar indian-harvard-table
330 '(;; for encode/decode
332 "a" ("A" "aa") "i" ("I" "ii") "u" ("U" "uu")
333 "R" ("L" "lR") nil nil
"e" "ai"
334 nil nil
"o" "au" ("RR" "q" "Q") ("LL" "E" "lRR"))
336 "k" "kh" "g" "gh" "G"
337 "c" "ch" "j" "jh" "J"
338 "T" "Th" "D" "Dh" "N"
339 "t" "th" "d" "dh" "n" nil
340 "p" "ph" "b" "bh" "m"
341 "y" "r" nil
"l" "L" nil
"v"
342 ("z" "Z") "S" "s" "h"
343 nil nil nil nil nil nil nil nil
346 nil
"M" "H" "'" nil
"." nil
)))
348 (defvar indian-tokyo-table
349 '(;; for encode/decode
351 "a" ("A" "aa") "i" ("I" "ii") "u" ("U" "uu")
352 "R" ("L" "lR") nil nil
"e" "ai"
353 nil nil
"o" "au" ("Q" "RR" "q") ("E" "LL" "lRR"))
355 "k" "kh" "g" "gh" "G"
356 "c" "ch" "j" "jh" "J"
357 "T" "Th" "D" "Dh" "N"
358 "t" "th" "d" "dh" "n" nil
359 "p" "ph" "b" "bh" "m"
360 "y" "r" nil
"l" "L" nil
"v"
361 ("Z" "z") "S" "s" "h"
362 nil nil nil nil nil nil nil nil
365 nil
"M" "H" "'" nil
"." nil
)))
367 (defvar indian-aiba-table
368 '(;; for encode/decode
370 "a" "aa" "i" "ii" "u" "uu"
371 ".r" ".l" nil nil
"e" "ai"
372 nil nil
"o" "au" "~r" "~l")
374 "k" "kh" "g" "gh" "^n"
375 "c" "ch" "j" "jh" "~n"
376 ".t" ".th" ".d" ".dh" ".n"
377 "t" "th" "d" "dh" "n" nil
378 "p" "ph" "b" "bh" "m"
379 "y" "r" nil
"l" nil nil
"v"
381 nil nil nil nil nil nil nil nil
384 nil
".m" ".h" "'" nil
"." nil
)))
386 (defun mapthread (function seq1
&rest seqrest
)
387 "Apply FUNCTION to each element of SEQ1 and return result list.
388 If there are several SEQRESTs, FUNCTION is called with that many
389 arguments, with all possible combinations of these multiple SEQUENCES.
390 Thus, if SEQ1 contains 3 elements and SEQ2 contains 5 elements, then
391 FUNCTION will be called 15 times."
397 `(lambda (&rest y
) (apply ',function x y
))
400 (mapcar function seq1
)))
402 (defun indian--puthash-char (char trans-char hashtbls
)
403 (let ((encode-hash (car hashtbls
)) ;; char -> trans
404 (decode-hash (cdr hashtbls
)) ;; trans -> char
406 ;; char -- nil / char / string (/ list of vowel & matra)
407 ;; trans-char -- nil / string / list of strings
408 (when (and char trans-char
)
409 (if (stringp trans-char
) (setq trans-char
(list trans-char
)))
410 (if (char-valid-p char
) (setq char
(char-to-string char
)))
411 (puthash char
(car trans-char
) encode-hash
)
412 (dolist (trans trans-char
)
413 (puthash trans char decode-hash
)))))
415 (defun indian--map (f l1 l2
)
417 (funcall f
(pop l1
) (pop l2
))))
419 (defun indian--puthash-v (v trans-v hashtbls
)
422 (indian--puthash-char (car v
) trans-v hashtbls
))
425 (defun indian--puthash-c (c trans-c halant hashtbls
)
428 (if (char-valid-p c
) (setq c
(char-to-string c
)))
429 (indian--puthash-char (concat c halant
) trans-c hashtbls
))
432 (defun indian--puthash-m (m trans-m hashtbls
)
435 (indian--puthash-char m trans-m hashtbls
))
438 (defun indian--puthash-cv (c trans-c v trans-v hashtbls
)
443 (when (and c trans-c v trans-v
)
444 (if (char-valid-p c
) (setq c
(char-to-string c
)))
445 (setq v
(if (char-valid-p (cadr v
)) (char-to-string (cadr v
)) ""))
446 (if (stringp trans-c
) (setq trans-c
(list trans-c
)))
447 (if (stringp trans-v
) (setq trans-v
(list trans-v
)))
448 (indian--puthash-char
451 (mapthread 'concat trans-c trans-v
))
456 (defun indian-make-hash (table trans-table
)
457 "Indian Transliteration Hash for decode/encode"
458 (let* ((encode-hash (make-hash-table :test
'equal
))
459 (decode-hash (make-hash-table :test
'equal
))
460 (hashtbls (cons encode-hash decode-hash
))
461 (vowels (elt table
0))
462 (consonants (elt table
1))
464 (digits (elt table
3))
465 (halant (char-to-string (elt misc
4)))
466 (trans-vowels (elt trans-table
0))
467 (trans-consonants (elt trans-table
1))
468 (trans-misc (elt trans-table
2))
469 (trans-digits '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")))
470 (indian--puthash-v vowels trans-vowels hashtbls
)
471 (indian--puthash-c consonants trans-consonants halant hashtbls
)
472 (indian--puthash-cv consonants trans-consonants
473 vowels trans-vowels hashtbls
)
474 (indian--puthash-m misc trans-misc hashtbls
)
475 (indian--puthash-m digits trans-digits hashtbls
)
478 (defvar indian-dev-itrans-v5-hash
479 (indian-make-hash indian-dev-base-table
480 indian-itrans-v5-table
))
481 (defvar indian-dev-kyoto-harvard-hash
482 (indian-make-hash indian-dev-base-table
483 indian-kyoto-harvard-table
))
484 (defvar indian-dev-aiba-hash
485 (indian-make-hash indian-dev-base-table
488 (defvar indian-pnj-itrans-v5-hash
489 (indian-make-hash indian-pnj-base-table
490 indian-itrans-v5-table
))
492 (defvar indian-gjr-itrans-v5-hash
493 (indian-make-hash indian-gjr-base-table
494 indian-itrans-v5-table
))
496 (defvar indian-ori-itrans-v5-hash
497 (indian-make-hash indian-ori-base-table
498 indian-itrans-v5-table
))
500 (defvar indian-bng-itrans-v5-hash
501 (indian-make-hash indian-bng-base-table
502 indian-itrans-v5-table
))
504 (defvar indian-asm-itrans-v5-hash
505 (indian-make-hash indian-asm-base-table
506 indian-itrans-v5-table
))
508 (defvar indian-tlg-itrans-v5-hash
509 (indian-make-hash indian-tlg-base-table
510 indian-itrans-v5-table
))
512 (defvar indian-knd-itrans-v5-hash
513 (indian-make-hash indian-knd-base-table
514 indian-itrans-v5-table
))
516 (defvar indian-mlm-itrans-v5-hash
517 (indian-make-hash indian-mlm-base-table
518 indian-itrans-v5-table
))
520 (defvar indian-tml-itrans-v5-hash
521 (indian-make-hash indian-tml-base-table
522 indian-itrans-v5-table
))
525 (defmacro indian-translate-region
(from to hashtable encode-p
)
528 (let ((regexp ,(indian-regexp-of-hashtbl-keys
529 (if encode-p
(car (eval hashtable
))
530 (cdr (eval hashtable
))))))
531 (narrow-to-region from to
)
532 (goto-char (point-min))
533 (while (re-search-forward regexp nil t
)
534 (let ((matchstr (gethash (match-string 0)
538 (if matchstr
(replace-match matchstr
))))))))
542 (defun indian-dev-itrans-v5-encode-region (from to
)
544 (indian-translate-region
545 from to indian-dev-itrans-v5-hash t
))
547 (defun indian-dev-itrans-v5-decode-region (from to
)
549 (indian-translate-region
550 from to indian-dev-itrans-v5-hash nil
))
552 (defun indian-dev-kyoto-harvard-encode-region (from to
)
554 (indian-translate-region
555 from to indian-dev-kyoto-harvard-hash t
))
557 (defun indian-dev-kyoto-harvard-decode-region (from to
)
559 (indian-translate-region
560 from to indian-dev-kyoto-harvard-hash nil
))
562 (defun indian-dev-aiba-encode-region (from to
)
564 (indian-translate-region
565 from to indian-dev-aiba-hash t
))
567 (defun indian-dev-aiba-decode-region (from to
)
569 (indian-translate-region
570 from to indian-dev-aiba-hash nil
))
575 ;;; IS 13194 utilities
577 ;; The followings provide conversion between IS 13194 (ISCII) and UCS.
579 (defvar ucs-devanagari-to-is13194-alist
580 '(;;Unicode vs IS13194 ;; only Devanagari is supported now.
581 (?
\x0900 .
"[U+0900]")
582 (?
\x0901 .
"\e(5!\e(B")
583 (?
\x0902 .
"\e(5"\e(B")
584 (?\x0903 . "\e(5#\e(B")
585 (?\x0904 . "[U
+0904]")
586 (?\x0905 . "\e(5$
\e(B")
587 (?\x0906 . "\e(5%
\e(B")
588 (?\x0907 . "\e(5&\e(B")
589 (?\x0908 . "\e(5'\e(B")
590 (?\x0909 . "\e(5(\e(B")
591 (?\x090a . "\e(5)\e(B")
592 (?\x090b . "\e(5*\e(B")
593 (?\x090c . "\e(5&i
\e(B")
594 (?\x090d . "\e(5.
\e(B")
595 (?\x090e . "\e(5+\e(B")
596 (?\x090f . "\e(5,\e(B")
597 (?\x0910 . "\e(5-\e(B")
598 (?\x0911 . "\e(52\e(B")
599 (?\x0912 . "\e(5/\e(B")
600 (?\x0913 . "\e(50\e(B")
601 (?\x0914 . "\e(51\e(B")
602 (?\x0915 . "\e(53\e(B")
603 (?\x0916 . "\e(54\e(B")
604 (?\x0917 . "\e(55\e(B")
605 (?\x0918 . "\e(56\e(B")
606 (?\x0919 . "\e(57\e(B")
607 (?\x091a . "\e(58\e(B")
608 (?\x091b . "\e(59\e(B")
609 (?\x091c . "\e(5:\e(B")
610 (?\x091d . "\e(5;\e(B")
611 (?
\x091e .
"\e(5<\e(B")
612 (?
\x091f .
"\e(5=\e(B")
613 (?
\x0920 .
"\e(5>\e(B")
614 (?
\x0921 .
"\e(5?\e(B")
615 (?
\x0922 .
"\e(5@\e(B")
616 (?
\x0923 .
"\e(5A\e(B")
617 (?
\x0924 .
"\e(5B\e(B")
618 (?
\x0925 .
"\e(5C\e(B")
619 (?
\x0926 .
"\e(5D\e(B")
620 (?
\x0927 .
"\e(5E\e(B")
621 (?
\x0928 .
"\e(5F\e(B")
622 (?
\x0929 .
"\e(5G\e(B")
623 (?
\x092a .
"\e(5H\e(B")
624 (?
\x092b .
"\e(5I\e(B")
625 (?
\x092c .
"\e(5J\e(B")
626 (?
\x092d .
"\e(5K\e(B")
627 (?
\x092e .
"\e(5L\e(B")
628 (?
\x092f .
"\e(5M\e(B")
629 (?
\x0930 .
"\e(5O\e(B")
630 (?
\x0931 .
"\e(5P\e(B")
631 (?
\x0932 .
"\e(5Q\e(B")
632 (?
\x0933 .
"\e(5R\e(B")
633 (?
\x0934 .
"\e(5S\e(B")
634 (?
\x0935 .
"\e(5T\e(B")
635 (?
\x0936 .
"\e(5U\e(B")
636 (?
\x0937 .
"\e(5V\e(B")
637 (?
\x0938 .
"\e(5W\e(B")
638 (?
\x0939 .
"\e(5X\e(B")
639 (?
\x093a .
"[U+093a]")
640 (?
\x093b .
"[U+093b]")
641 (?
\x093c .
"\e(5i\e(B")
642 (?
\x093d .
"\e(5ji\e(B")
643 (?
\x093e .
"\e(5Z\e(B")
644 (?
\x093f .
"\e(5[\e(B")
645 (?
\x0940 .
"\e(5\\e(B")
646 (?
\x0941 .
"\e(5]\e(B")
647 (?
\x0942 .
"\e(5^\e(B")
648 (?
\x0943 .
"\e(5_\e(B")
649 (?
\x0944 .
"\e(5_i\e(B")
650 (?
\x0945 .
"\e(5c\e(B")
651 (?
\x0946 .
"\e(5`\e(B")
652 (?
\x0947 .
"\e(5a\e(B")
653 (?
\x0948 .
"\e(5b\e(B")
654 (?
\x0949 .
"\e(5g\e(B")
655 (?
\x094a .
"\e(5d\e(B")
656 (?
\x094b .
"\e(5e\e(B")
657 (?
\x094c .
"\e(5f\e(B")
658 (?
\x094d .
"\e(5h\e(B")
659 (?
\x094e .
"[U+094e]")
660 (?
\x094f .
"[U+094f]")
661 (?
\x0950 .
"\e(5!i\e(B")
662 (?
\x0951 .
"\e(5p5\e(B")
663 (?
\x0952 .
"\e(5p8\e(B")
664 (?
\x0953 .
"[DEVANAGARI GRAVE ACCENT]")
665 (?
\x0954 .
"[DEVANAGARI ACUTE ACCENT]")
666 (?
\x0955 .
"[U+0955]")
667 (?
\x0956 .
"[U+0956]")
668 (?
\x0957 .
"[U+0957]")
669 (?
\x0958 .
"\e(53i\e(B")
670 (?
\x0959 .
"\e(54i\e(B")
671 (?
\x095a .
"\e(55i\e(B")
672 (?
\x095b .
"\e(5:i\e(B")
673 (?
\x095c .
"\e(5?i\e(B")
674 (?
\x095d .
"\e(5@i\e(B")
675 (?
\x095e .
"\e(5Ii\e(B")
676 (?
\x095f .
"\e(5N\e(B")
677 (?
\x0960 .
"\e(5*i\e(B")
678 (?
\x0961 .
"\e(5'i\e(B")
679 (?
\x0962 .
"\e(5[i\e(B")
680 (?
\x0963 .
"\e(5ei\e(B")
681 (?
\x0964 .
"\e(5j\e(B")
682 (?
\x0965 .
"\e(5jj\e(B")
683 (?
\x0966 .
"\e(5q\e(B")
684 (?
\x0967 .
"\e(5r\e(B")
685 (?
\x0968 .
"\e(5s\e(B")
686 (?
\x0969 .
"\e(5t\e(B")
687 (?
\x096a .
"\e(5u\e(B")
688 (?
\x096b .
"\e(5v\e(B")
689 (?
\x096c .
"\e(5w\e(B")
690 (?
\x096d .
"\e(5x\e(B")
691 (?
\x096e .
"\e(5y\e(B")
692 (?
\x096f .
"\e(5z\e(B")
693 (?
\x0970 .
"[U+0970]")
694 (?
\x0971 .
"[U+0971]")
695 (?
\x0972 .
"[U+0972]")
696 (?
\x0973 .
"[U+0973]")
697 (?
\x0974 .
"[U+0974]")
698 (?
\x0975 .
"[U+0975]")
699 (?
\x0976 .
"[U+0976]")
700 (?
\x0977 .
"[U+0977]")
701 (?
\x0978 .
"[U+0978]")
702 (?
\x0979 .
"[U+0979]")
703 (?
\x097a .
"[U+097a]")
704 (?
\x097b .
"[U+097b]")
705 (?
\x097c .
"[U+097c]")
706 (?
\x097d .
"[U+097d]")
707 (?
\x097e .
"[U+097e]")
708 (?
\x097f .
"[U+097f]")))
710 (defvar ucs-bengali-to-is13194-alist nil
)
711 (defvar ucs-assamese-to-is13194-alist nil
)
712 (defvar ucs-gurmukhi-to-is13194-alist nil
)
713 (defvar ucs-gujarati-to-is13194-alist nil
)
714 (defvar ucs-oriya-to-is13194-alist nil
)
715 (defvar ucs-tamil-to-is13194-alist nil
)
716 (defvar ucs-telugu-to-is13194-alist nil
)
717 (defvar ucs-malayalam-to-is13194-alist nil
)
718 (defvar ucs-kannada-to-is13194-alist nil
)
720 (defvar is13194-default-repartory
'devanagari
)
722 (defvar is13194-repertory-to-ucs-script
723 `((DEF ?
\x40 ,is13194-default-repartory
)
724 (RMN ?
\x41 ,is13194-default-repartory
)
725 (DEV ?
\x42 devanagari
)
732 (MLM ?
\x49 malayalam
)
734 (PNJ ?
\x4b gurmukhi
)))
736 ;; for guiding find-variable function.
737 (defvar is13194-to-ucs-devanagari-hashtbl nil
)
738 (defvar is13194-to-ucs-devanagari-regexp nil
)
739 (defvar is13194-to-ucs-bengali-hashtbl nil
)
740 (defvar is13194-to-ucs-bengali-regexp nil
)
741 (defvar is13194-to-ucs-assamese-hashtbl nil
)
742 (defvar is13194-to-ucs-assamese-regexp nil
)
743 (defvar is13194-to-ucs-gurmukhi-hashtbl nil
)
744 (defvar is13194-to-ucs-gurmukhi-regexp nil
)
745 (defvar is13194-to-ucs-gujarati-hashtbl nil
)
746 (defvar is13194-to-ucs-gujarati-regexp nil
)
747 (defvar is13194-to-ucs-oriya-hashtbl nil
)
748 (defvar is13194-to-ucs-oriya-regexp nil
)
749 (defvar is13194-to-ucs-tamil-hashtbl nil
)
750 (defvar is13194-to-ucs-tamil-regexp nil
)
751 (defvar is13194-to-ucs-telugu-hashtbl nil
)
752 (defvar is13194-to-ucs-telugu-regexp nil
)
753 (defvar is13194-to-ucs-malayalam-hashtbl nil
)
754 (defvar is13194-to-ucs-malayalam-regexp nil
)
755 (defvar is13194-to-ucs-kannada-hashtbl nil
)
756 (defvar is13194-to-ucs-kannada-regexp nil
)
759 (function (lambda (script)
760 (let ((hashtable (intern (concat "is13194-to-ucs-"
761 (symbol-name script
) "-hashtbl" )))
762 (regexp (intern (concat "is13194-to-ucs-"
763 (symbol-name script
) "-regexp"))))
764 (set hashtable
(make-hash-table :test
'equal
:size
128))
766 (function (lambda (x)
767 (put-char-code-property (decode-char 'ucs
(car x
))
769 (put-char-code-property (decode-char 'ucs
(car x
))
771 (puthash (cdr x
) (char-to-string (decode-char 'ucs
(car x
)))
773 (eval (intern (concat "ucs-" (symbol-name script
)
774 "-to-is13194-alist"))))
775 (set regexp
(indian-regexp-of-hashtbl-keys (eval hashtable
))))))
776 '(devanagari bengali assamese gurmukhi gujarati
777 oriya tamil telugu malayalam kannada
))
779 (defvar ucs-to-is13194-regexp
780 ;; only Devanagari is supported now.
781 (concat "[" (char-to-string (decode-char 'ucs
#x0900
))
782 "-" (char-to-string (decode-char 'ucs
#x097f
)) "]")
783 "Regexp that matches to conversion")
785 (defun ucs-to-iscii-region (from to
)
786 "Converts the indian UCS characters in the region to ISCII.
787 Returns new end position."
789 ;; only Devanagari is supported now.
792 (narrow-to-region from to
)
793 (goto-char (point-min))
794 (let* ((current-repertory is13194-default-repartory
))
795 (while (re-search-forward ucs-to-is13194-regexp nil t
)
797 (get-char-code-property (string-to-char (match-string 0))
801 (defun iscii-to-ucs-region (from to
)
802 "Converts the ISCII characters in the region to UCS.
803 Returns new end position."
805 ;; only Devanagari is supported now.
808 (narrow-to-region from to
)
809 (goto-char (point-min))
810 (let* ((current-repertory is13194-default-repartory
)
812 (intern (concat "is13194-to-ucs-"
813 (symbol-name current-repertory
) "-hashtbl")))
815 (intern (concat "is13194-to-ucs-"
816 (symbol-name current-repertory
) "-regexp"))))
817 (while (re-search-forward (eval current-regexp
) nil t
)
819 (gethash (match-string 0) (eval current-hashtable
) ""))))
823 (defun indian-compose-region (from to
)
824 "Compose the region according to `composition-function-table'. "
828 (let ((pos from
) chars
(max to
))
829 (narrow-to-region from to
)
831 (setq chars
(compose-chars-after pos
))
832 (if chars
(setq pos
(+ pos chars
)) (setq pos
(1+ pos
))))))))
835 (defun indian-compose-string (string)
838 (indian-compose-region (point-min) (point-max))
842 (defun in-is13194-post-read-conversion (len)
843 (let ((pos (point)) endpos
)
844 (setq endpos
(iscii-to-ucs-region pos
(+ pos len
)))
845 (indian-compose-region pos endpos
)
849 (defun in-is13194-pre-write-conversion (from to
)
850 (let ((buf (current-buffer)))
851 (set-buffer (generate-new-buffer " *temp*"))
854 (insert-buffer-substring buf from to
))
855 (ucs-to-iscii-region (point-min) (point-max))
861 ;;; Backward Compatibility support programs
863 ;; The followings provides the conversion from old-implementation of
864 ;; Emacs Devanagari script to UCS.
866 (defconst indian-2-colum-to-ucs
868 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
869 ;;2120 \e$(5!!!"!#!$!%!&!'!(!)!*!+!,!-!.!/\e(B
870 ("\e$(5!!\e(B" .
"\e$,15A\e(B")
871 ("\e$(5!"\e(B" . "\e$
,15B
\e(B")
872 ("\e$
(5!#\e(B" . "\e$
,15C
\e(B")
873 ("\e$
(5!$
\e(B" . "\e$
,15E
\e(B")
874 ("\e$
(5!%
\e(B" . "\e$
,15F
\e(B")
875 ("\e$
(5!&\e(B" . "\e$
,15G
\e(B")
876 ("\e$
(5!'\e(B" . "\e$
,15H
\e(B")
877 ("\e$
(5!(\e(B" . "\e$
,15I
\e(B")
878 ("\e$
(5!)\e(B" . "\e$
,15J
\e(B")
879 ("\e$
(5!*\e(B" . "\e$
,15K
\e(B")
880 ("\e$
(5!*"p\e(B" .
"\e$,15p6#\e(B")
881 ("\e$(5!+\e(B" .
"\e$,15N\e(B")
882 ("\e$(5!,\e(B" .
"\e$,15O\e(B")
883 ("\e$(5!-\e(B" .
"\e$,15P\e(B")
884 ("\e$(5!.\e(B" .
"\e$,15M\e(B")
885 ("\e$(5!/\e(B" .
"\e$,15R\e(B")
886 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
887 ;;2130 \e$(5!0!1!2!3!4!5!6!7!8!9!:!;!<!=!>!?\e(B
888 ("\e$(5!0\e(B" .
"\e$,15S\e(B")
889 ("\e$(5!1\e(B" .
"\e$,15T\e(B")
890 ("\e$(5!2\e(B" .
"\e$,15Q\e(B")
891 ("\e$(5!3\e(B" .
"\e$,15U\e(B")
892 ("\e$(5!4\e(B" .
"\e$,15V\e(B")
893 ("\e$(5!5\e(B" .
"\e$,15W\e(B")
894 ("\e$(5!6\e(B" .
"\e$,15X\e(B")
895 ("\e$(5!7\e(B" .
"\e$,15Y\e(B")
896 ("\e$(5!8\e(B" .
"\e$,15Z\e(B")
897 ("\e$(5!9\e(B" .
"\e$,15[\e(B")
898 ("\e$(5!:\e(B" .
"\e$,15\\e(B")
899 ("\e$(5!;\e(B" .
"\e$,15]\e(B")
900 ("\e$(5!<\e(B" .
"\e$,15^\e(B")
901 ("\e$(5!=\e(B" .
"\e$,15_\e(B")
902 ("\e$(5!>\e(B" .
"\e$,15`\e(B")
903 ("\e$(5!?\e(B" .
"\e$,15a\e(B")
904 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
905 ;;2140 \e$(5!@!A!B!C!D!E!F!G!H!I!J!K!L!M!N!O\e(B
906 ("\e$(5!@\e(B" .
"\e$,15b\e(B")
907 ("\e$(5!A\e(B" .
"\e$,15c\e(B")
908 ("\e$(5!B\e(B" .
"\e$,15d\e(B")
909 ("\e$(5!C\e(B" .
"\e$,15e\e(B")
910 ("\e$(5!D\e(B" .
"\e$,15f\e(B")
911 ("\e$(5!E\e(B" .
"\e$,15g\e(B")
912 ("\e$(5!F\e(B" .
"\e$,15h\e(B")
913 ("\e$(5!G\e(B" .
"\e$,15i\e(B")
914 ("\e$(5!H\e(B" .
"\e$,15j\e(B")
915 ("\e$(5!I\e(B" .
"\e$,15k\e(B")
916 ("\e$(5!J\e(B" .
"\e$,15l\e(B")
917 ("\e$(5!K\e(B" .
"\e$,15m\e(B")
918 ("\e$(5!L\e(B" .
"\e$,15n\e(B")
919 ("\e$(5!M\e(B" .
"\e$,15o\e(B")
920 ("\e$(5!N\e(B" .
"\e$,16?\e(B")
921 ("\e$(5!O\e(B" .
"\e$,15p\e(B")
922 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
923 ;;2150 \e$(5!P!Q!R!S!T!U!V!W!X!Y!Z![!\!]!^!_\e(B
924 ("\e$(5!P\e(B" .
"\e$,15q\e(B")
925 ("\e$(5!Q\e(B" .
"\e$,15r\e(B")
926 ("\e$(5!R\e(B" .
"\e$,15s\e(B")
927 ("\e$(5!S\e(B" .
"\e$,15t\e(B")
928 ("\e$(5!T\e(B" .
"\e$,15u\e(B")
929 ("\e$(5!U\e(B" .
"\e$,15v\e(B")
930 ("\e$(5!V\e(B" .
"\e$,15w\e(B")
931 ("\e$(5!W\e(B" .
"\e$,15x\e(B")
932 ("\e$(5!X\e(B" .
"\e$,15y\e(B")
933 ("\e$(5!Z\e(B" .
"\e$,15~\e(B")
934 ("\e$(5![\e(B" .
"\e$,15\x7f\e(B")
935 ("\e$(5!\\e(B" .
"\e$,16 \e(B")
936 ("\e$(5!]\e(B" .
"\e$,16!\e(B")
937 ("\e$(5!^\e(B" .
"\e$,16"\e(B")
938 ("\e$
(5!_
\e(B" . "\e$
,16#\e(B")
939 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
940 ;;2160 \e$(5!`!a!b!c!d!e!f!g!h!i!j!k!l!m!n!o\e(B
941 ("\e$
(5!`\e(B" . "\e$
,16&\e(B")
942 ("\e$
(5!a
\e(B" . "\e$
,16'\e(B")
943 ("\e$
(5!b
\e(B" . "\e$
,16(\e(B")
944 ("\e$
(5!c
\e(B" . "\e$
,16%
\e(B")
945 ("\e$
(5!d
\e(B" . "\e$
,16*\e(B")
946 ("\e$
(5!e
\e(B" . "\e$
,16+\e(B")
947 ("\e$
(5!f
\e(B" . "\e$
,16,\e(B")
948 ("\e$
(5!g
\e(B" . "\e$
,16)\e(B")
949 ("\e$
(5!h
\e(B" . "\e$
,16-
\e(B")
950 ("\e$
(5!i
\e(B" . "\e$
,15|
\e(B")
951 ("\e$
(5!j
\e(B" . "\e$
,16D
\e(B")
952 ("\e$
(5!j
!j
\e(B" . "\e$
,16E
\e(B")
953 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
954 ;;2170 \e$(5!p!q!r!s!t!u!v!w!x!y!z!{!|!}!~\e(B
955 ("\e$
(5!q
\e(B" . "\e$
,16F
\e(B")
956 ("\e$
(5!r
\e(B" . "\e$
,16G
\e(B")
957 ("\e$
(5!s
\e(B" . "\e$
,16H
\e(B")
958 ("\e$
(5!t
\e(B" . "\e$
,16I
\e(B")
959 ("\e$
(5!u
\e(B" . "\e$
,16J
\e(B")
960 ("\e$
(5!v
\e(B" . "\e$
,16K
\e(B")
961 ("\e$
(5!w
\e(B" . "\e$
,16L\e(B")
962 ("\e$
(5!x
\e(B" . "\e$
,16M
\e(B")
963 ("\e$
(5!y
\e(B" . "\e$
,16N
\e(B")
964 ("\e$
(5!z
\e(B" . "\e$
,16O
\e(B")
965 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
966 ;;2220 \e$(5"!"""#"$
"%"&"'"(")"*"+","-".
"/\e(B
967 ("\e$
(5"!\e(B" .
"\e$,16;6-5p\e(B")
968 ("\e$(5""\e(B" .
"\e$,16>6-5p\e(B")
969 ("\e$(5"#\e(B" . "\e$
,15U6-
5p
\e(B")
970 ("\e$
(5"$\e(B" .
"\e$,15W6-5p\e(B")
971 ("\e$(5"%
\e(B" . "\e$
,15d6-5p
\e(B")
972 ("\e$
(5"&\e(B" .
"\e$,15j6-5p\e(B")
973 ("\e$(5"'\e(B" . "\e$
,15k6-5p
\e(B")
974 ("\e$
(5")\e(B" .
"\e$,15v6-5p\e(B")
975 ("\e$(5",\e(B" . "\e$
,15p6
!\e(B")
976 ("\e$
(5"-\e(B" .
"\e$,15p6"\e(B")
977 ("\e$
(5".\e(B" .
"\e$,15q6!\e(B")
978 ("\e$(5"/\e(B" . "\e$
,15q6
"\e(B")
979 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
980 ;;2230 \e$(5"0"1"2"3"4"5"6"7"8"9":";"<"=">"?\e(B
981 ("\e$(5"3\e(B" . "\e$
,15U6-
\e(B")
982 ("\e$
(5"4\e(B" .
"\e$,15V6-\e(B")
983 ("\e$(5"5\e(B" . "\e$
,15W6-
\e(B")
984 ("\e$
(5"6\e(B" .
"\e$,15X6-\e(B")
985 ("\e$(5"8\e(B" . "\e$
,15Z6-
\e(B")
986 ("\e$
(5"8"q
\e(B" . "\e$
,15Z6-5p6-
\e(B")
987 ("\e$
(5":\e(B" .
"\e$,15\6-\e(B")
988 ("\e$(5";\e(B" . "\e$,15]6-\e(B")
989 ("\e$(5"<\e(B" . "\e$
,15^
6-
\e(B")
990 ("\e$
(5"<\e(B" .
"\e$,15^6-\e(B")
991 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
992 ;;2240 \e$(5"@"A"B"C"D"E"F"G"H"I"J"K"L"M"N"O\e(B
993 ("\e$(5"A
\e(B" . "\e$
,15c6-
\e(B")
994 ("\e$
(5"B\e(B" .
"\e$,15d6-\e(B")
995 ("\e$(5"C
\e(B" . "\e$
,15e6-
\e(B")
996 ("\e$
(5"E\e(B" .
"\e$,15g6-\e(B")
997 ("\e$(5"F
\e(B" . "\e$
,15h6-
\e(B")
998 ("\e$
(5"G\e(B" .
"\e$,15i6-\e(B")
999 ("\e$(5"H
\e(B" . "\e$
,15j6-
\e(B")
1000 ("\e$
(5"I\e(B" .
"\e$,15k6-\e(B")
1001 ("\e$(5"J
\e(B" . "\e$
,15l6-
\e(B")
1002 ("\e$
(5"J\e(B" .
"\e$,15l6-\e(B")
1003 ("\e$(5"K
\e(B" . "\e$
,15m6-
\e(B")
1004 ("\e$
(5"L\e(B" .
"\e$,15n6-\e(B")
1005 ("\e$(5"M
\e(B" . "\e$
,15o6-
\e(B")
1006 ("\e$
(5"N\e(B" .
"\e$,16?6-\e(B")
1007 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1008 ;;2250 \e$(5"P"Q"R"S"T"U"V"W"X"Y"Z"["\"]"^"_\e(B
1009 ("\e$(5"Q
\e(B" . "\e$
,15r6-
\e(B")
1010 ("\e$
(5"R\e(B" .
"\e$,15s6-\e(B")
1011 ("\e$(5"S
\e(B" . "\e$
,15t6-
\e(B")
1012 ("\e$
(5"T\e(B" .
"\e$,15u6-\e(B")
1013 ("\e$(5"U
\e(B" . "\e$
,15v6-
\e(B")
1014 ("\e$
(5"V\e(B" .
"\e$,15w6-\e(B")
1015 ("\e$(5"W
\e(B" . "\e$
,15x6-
\e(B")
1016 ("\e$
(5"]\e(B" .
"\e$,16-5o\e(B")
1017 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1018 ;;2260 \e$(5"`"a"b"c"d"e"f"g"h"i"j"k"l"m"n"o\e(B
1019 ("\e$(5"`\e(B" . "\e$
,15W6-5p6-
\e(B")
1020 ("\e$
(5"a\e(B" .
"\e$,15X6-5h6-\e(B")
1021 ("\e$(5"c
\e(B" . "\e$
,15d6-5d6-
\e(B")
1022 ("\e$
(5"d\e(B" .
"\e$,15d6-5p6-\e(B")
1023 ("\e$(5"e
\e(B" . "\e$
,15g6-5h6-
\e(B")
1024 ("\e$
(5"f\e(B" .
"\e$,15g6-5p6-\e(B")
1025 ("\e$(5"g
\e(B" . "\e$
,15j6-5d6-
\e(B")
1026 ("\e$
(5"h\e(B" .
"\e$,15v6-5Z6-\e(B")
1027 ("\e$(5"i
\e(B" . "\e$
,15v6-5p6-
\e(B")
1028 ("\e$
(5"j\e(B" .
"\e$,15v6-5u6-\e(B")
1029 ("\e$(5"k
\e(B" . "\e$
,15h6-5h6-
\e(B")
1030 ("\e$
(5"l\e(B" .
"\e$,15U6-5w6-\e(B")
1031 ("\e$(5"m
\e(B" . "\e$
,15\
6-
5^
6-
\e(B")
1032 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1033 ;;2270 \e$(5"p
"q"r
"s"t
"u"v
"w"x
"y"z
"{"|
"}"~
\e(B
1034 ("\e$(5"p
\e(B" . "\e$
,15p6-
\e(B")
1035 ("\e$
(5"q\e(B" .
"\e$,16-5p\e(B")
1036 ("\e$(5"r
\e(B" . "\e$
,16-
5p
\e(B")
1037 ("\e$
(5"s\e(B" .
"\e$,1686-\e(B")
1038 ("\e$(5"t
\e(B" . "\e$
,1696-
\e(B")
1039 ("\e$
(5"u\e(B" .
"\e$,16:6-\e(B")
1040 ("\e$(5"y
\e(B" . "\e$
,16>6-
\e(B")
1041 ("\e$
(5"z\e(B" .
"\e$,16;6-\e(B")
1042 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1043 ;;2320 \e$(5#!#"###$#%#&#'#(#)#*#+#,#-#.#/\e(B
1044 ("\e$(5#!\e(B" .
"\e$,160\e(B")
1045 ("\e$(5#&\e(B" .
"\e$,15L\e(B")
1046 ("\e$(5#&"p
\e(B" . "\e$
,15p6$
\e(B")
1047 ("\e$
(5#'\e(B" . "\e$
,16A
\e(B")
1048 ("\e$
(5#'"p\e(B" .
"\e$,15p6C\e(B")
1049 ("\e$(5#*\e(B" .
"\e$,16@\e(B")
1050 ("\e$(5#*"p
\e(B" . "\e$
,15p6B
\e(B")
1051 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1052 ;;2330 \e$(5#0#1#2#3#4#5#6#7#8#9#:#;#<#=#>#?\e(B
1053 ("\e$
(5#3\e(B" . "\e$
,168\e(B")
1054 ("\e$
(5#4\e(B" . "\e$
,169\e(B")
1055 ("\e$
(5#5\e(B" . "\e$
,16:\e(B")
1056 ("\e$
(5#:\e(B" . "\e$
,16;\e(B")
1057 ("\e$(5#?\e(B" .
"\e$,16<\e(B")
1058 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1059 ;;2340 \e$(5#@#A#B#C#D#E#F#G#H#I#J#K#L#M#N#O\e(B
1060 ("\e$(5#@\e(B" .
"\e$,16=\e(B")
1061 ("\e$(5#I\e(B" .
"\e$,16>\e(B")
1062 ("\e$(5#J\e(B" .
"\e$,15}\e(B")
1063 ("\e$(5#K\e(B" .
"\e$,16$\e(B")
1064 ("\e$(5#L\e(B" .
"\e$,16B\e(B")
1065 ("\e$(5#M\e(B" .
"\e$,16C\e(B")
1066 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1067 ;;2350 \e$(5#P#Q#R#S#T#U#V#W#X#Y#Z#[#\#]#^#_\e(B
1068 ("\e$(5#P\e(B" .
"\e$,15n6-5h\e(B")
1069 ("\e$(5#Q\e(B" .
"\e$,15n6-5r\e(B")
1070 ("\e$(5#R\e(B" .
"\e$,15y6#\e(B")
1071 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1072 ;;2360 \e$(5#`#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o\e(B
1073 ("\e$(5#`\e(B" .
"\e$,15r6-5r\e(B")
1074 ("\e$(5#a\e(B" .
"\e$,15u6-5h\e(B")
1075 ("\e$(5#b\e(B" .
"\e$,15u6-5u\e(B")
1076 ("\e$(5#c\e(B" .
"\e$,15v6-5Z\e(B")
1077 ("\e$(5#d\e(B" .
"\e$,15v6-5h\e(B")
1078 ("\e$(5#e\e(B" .
"\e$,15v6-5l\e(B")
1079 ("\e$(5#f\e(B" .
"\e$,15v6-5r\e(B")
1080 ("\e$(5#g\e(B" .
"\e$,15v6-5u\e(B")
1081 ("\e$(5#h\e(B" .
"\e$,15w6-5_6-5p6-5o\e(B")
1082 ("\e$(5#i\e(B" .
"\e$,15w6-5_6-5o\e(B")
1083 ("\e$(5#j\e(B" .
"\e$,15w6-5_6-5u\e(B")
1084 ("\e$(5#k\e(B" .
"\e$,15w6-5_\e(B")
1085 ("\e$(5#l\e(B" .
"\e$,15w6-5`\e(B")
1086 ("\e$(5#m\e(B" .
"\e$,15x6-5h\e(B")
1087 ("\e$(5#n\e(B" .
"\e$,15x6-5p\e(B")
1088 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1089 ;;2370 \e$(5#p#q#r#s#t#u#v#w#x#y#z#{#|#}#~\e(B
1090 ("\e$(5#p\e(B" .
"\e$,15y6-5c\e(B")
1091 ("\e$(5#q\e(B" .
"\e$,15y6-5h\e(B")
1092 ("\e$(5#r\e(B" .
"\e$,15y6-5n\e(B")
1093 ("\e$(5#s\e(B" .
"\e$,15y6-5o\e(B")
1094 ("\e$(5#t\e(B" .
"\e$,15y6-5p\e(B")
1095 ("\e$(5#u\e(B" .
"\e$,15y6-5r\e(B")
1096 ("\e$(5#v\e(B" .
"\e$,15y6-5u\e(B")
1097 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1098 ;;2420 \e$(5$!$"$#$$$%$&$'$($)$*$+$,$-$.$/\e(B
1099 ("\e$(5$!\e(B" .
"\e$,15U6-5d6-5p6-5o\e(B")
1100 ("\e$(5$"\e(B" . "\e$
,15U6-
5d
6-
5u\e(B")
1101 ("\e$
(5$
#\e(B" . "\e$
,15U6-
5d
6-
5o
\e(B")
1102 ("\e$
(5$$
\e(B" . "\e$
,15U6-
5h
6-
5o
\e(B")
1103 ("\e$
(5$%
\e(B" . "\e$
,15U6-
5p
6-
5o
\e(B")
1104 ("\e$
(5$
&\e(B" . "\e$
,15U6-
5u6-
5o
\e(B")
1105 ("\e$
(5$
'\e(B" . "\e$
,15U6-
5U\e(B")
1106 ("\e$
(5$
(\e(B" . "\e$
,15U6-
5d
\e(B")
1107 ("\e$
(5$
)\e(B" . "\e$
,15U6-
5h
\e(B")
1108 ("\e$
(5$
*\e(B" . "\e$
,15U6-
5n
\e(B")
1109 ("\e$
(5$
+\e(B" . "\e$
,15U6-
5o
\e(B")
1110 ("\e$
(5$
,\e(B" . "\e$
,15U6-
5r
\e(B")
1111 ("\e$
(5$-
\e(B" . "\e$
,15U6-
5u\e(B")
1112 ("\e$
(5$.
\e(B" . "\e$
,15U6-
5w
\e(B")
1113 ("\e$
(5$
/\e(B" . "\e$
,15X6-5h
\e(B")
1114 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1115 ;;2430 \e$(5$0$1$2$3$4$5$6$7$8$9$:$;$<$=$>$?\e(B
1116 ("\e$
(5$
0\e(B" . "\e$
,15Y6-5U6-5d6-5o
\e(B")
1117 ("\e$
(5$
1\e(B" . "\e$
,15Y6-5U6-5w6-5u
\e(B")
1118 ("\e$
(5$
2\e(B" . "\e$
,15Y6-5U6-5d
\e(B")
1119 ("\e$
(5$
3\e(B" . "\e$
,15Y6-5U6-5w
\e(B")
1120 ("\e$
(5$
4\e(B" . "\e$
,15Y6-5X6-5p
\e(B")
1121 ("\e$
(5$
5\e(B" . "\e$
,15Y6-5U6-5o
\e(B")
1122 ("\e$
(5$
6\e(B" . "\e$
,15Y6-5V6-5o
\e(B")
1123 ("\e$
(5$
7\e(B" . "\e$
,15Y6-5W6-5o
\e(B")
1124 ("\e$
(5$
8\e(B" . "\e$
,15Y6-5X6-5o
\e(B")
1125 ("\e$
(5$
9\e(B" . "\e$
,15Y6-5U
\e(B")
1126 ("\e$
(5$
:\e(B" . "\e$
,15Y6-5V
\e(B")
1127 ("\e$
(5$
;\e(B" . "\e$,15Y6-5W\e(B")
1128 ("\e$(5$<\e(B" .
"\e$,15Y6-5X\e(B")
1129 ("\e$(5$=\e(B" .
"\e$,15Y6-5Y\e(B")
1130 ("\e$(5$>\e(B" .
"\e$,15Y6-5h\e(B")
1131 ("\e$(5$?\e(B" .
"\e$,15Y6-5n\e(B")
1132 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1133 ;;2440 \e$(5$@$A$B$C$D$E$F$G$H$I$J$K$L$M$N$O\e(B
1134 ("\e$(5$@\e(B" .
"\e$,15Y6-5o\e(B")
1135 ("\e$(5$A\e(B" .
"\e$,15Z6-5Z\e(B")
1136 ("\e$(5$B\e(B" .
"\e$,15Z6-5^\e(B")
1137 ("\e$(5$C\e(B" .
"\e$,15[6-5o\e(B")
1138 ("\e$(5$D\e(B" .
"\e$,15\6-5p\e(B")
1139 ("\e$(5$E\e(B" .
"\e$,15\6-5^\e(B")
1140 ("\e$(5$F\e(B" .
"\e$,15^6-5Z\e(B")
1141 ("\e$(5$G\e(B" .
"\e$,15^6-5\\e(B")
1142 ("\e$(5$H\e(B" .
"\e$,15_6-5U\e(B")
1143 ("\e$(5$I\e(B" .
"\e$,15_6-5_\e(B")
1144 ("\e$(5$J\e(B" .
"\e$,15_6-5`\e(B")
1145 ("\e$(5$K\e(B" .
"\e$,15_6-5o\e(B")
1146 ("\e$(5$L\e(B" .
"\e$,15`6-5o\e(B")
1147 ("\e$(5$M\e(B" .
"\e$,15a6-5W6-5o\e(B")
1148 ("\e$(5$N\e(B" .
"\e$,15a6-5X6-5p\e(B")
1149 ("\e$(5$O\e(B" .
"\e$,15a6-5p6-5o\e(B")
1150 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1151 ;;2450 \e$(5$P$Q$R$S$T$U$V$W$X$Y$Z$[$\$]$^$_\e(B
1152 ("\e$(5$P\e(B" .
"\e$,15a6-5W\e(B")
1153 ("\e$(5$Q\e(B" .
"\e$,15a6-5X\e(B")
1154 ("\e$(5$R\e(B" .
"\e$,15a6-5a\e(B")
1155 ("\e$(5$S\e(B" .
"\e$,15a6-5n\e(B")
1156 ("\e$(5$T\e(B" .
"\e$,15a6-5o\e(B")
1157 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1158 ;;2460 \e$(5$`$a$b$c$d$e$f$g$h$i$j$k$l$m$n$o\e(B
1159 ("\e$(5$`\e(B" .
"\e$,15b6-5o\e(B")
1160 ("\e$(5$a\e(B" .
"\e$,15d6-5d\e(B")
1161 ("\e$(5$b\e(B" .
"\e$,15d6-5h\e(B")
1162 ("\e$(5$c\e(B" .
"\e$,15f6-5f6-5o\e(B")
1163 ("\e$(5$d\e(B" .
"\e$,15f6-5g6-5o\e(B")
1164 ("\e$(5$e\e(B" .
"\e$,15f6-5m6-5o\e(B")
1165 ("\e$(5$f\e(B" .
"\e$,15f6-5p6-5o\e(B")
1166 ("\e$(5$g\e(B" .
"\e$,15f6-5u6-5o\e(B")
1167 ("\e$(5$h\e(B" .
"\e$,15f6-5W6-5p\e(B")
1168 ("\e$(5$i\e(B" .
"\e$,15f6-5X6-5p\e(B")
1169 ("\e$(5$j\e(B" .
"\e$,15f6-5f6-5u\e(B")
1170 ("\e$(5$k\e(B" .
"\e$,15f6-5g6-5u\e(B")
1171 ("\e$(5$l\e(B" .
"\e$,15f6-5W\e(B")
1172 ("\e$(5$m\e(B" .
"\e$,15f6-5X\e(B")
1173 ("\e$(5$n\e(B" .
"\e$,15f6-5f\e(B")
1174 ("\e$(5$o\e(B" .
"\e$,15f6-5g\e(B")
1175 ;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
1176 ;;2470 \e$(5$p$q$r$s$t$u$v$w$x$y$z${$|$}$~\e(B
1177 ("\e$(5$p\e(B" .
"\e$,15f6-5h\e(B")
1178 ("\e$(5$q\e(B" .
"\e$,15f6-5l\e(B")
1179 ("\e$(5$r\e(B" .
"\e$,15f6-5m\e(B")
1180 ("\e$(5$s\e(B" .
"\e$,15f6-5n\e(B")
1181 ("\e$(5$t\e(B" .
"\e$,15f6-5o\e(B")
1182 ("\e$(5$u\e(B" .
"\e$,15f6-5u\e(B")
1183 ("\e$(5$v\e(B" .
"\e$,15g6-5h\e(B")
1184 ("\e$(5$w\e(B" .
"\e$,15h6-5h\e(B")
1185 ("\e$(5$x\e(B" .
"\e$,15j6-5d\e(B")
1186 ("\e$(5$y\e(B" .
"\e$,15j6-5h\e(B")
1187 ("\e$(5$z\e(B" .
"\e$,15j6-5r\e(B")
1188 ("\e$(5${\e(B" .
"\e$,15l6-5h\e(B")
1189 ("\e$(5$|\e(B" .
"\e$,15l6-5l\e(B")
1190 ("\e$(5$}\e(B" .
"\e$,15l6-5u\e(B")
1191 ("\e$(5$~\e(B" .
"\e$,15m6-5h\e(B")))
1193 (defconst indian-2-column-to-ucs-regexp
1194 "\e$(5!j!j\e(B\\|\e$(5"8"q\e(B\\|[\e$(5#&#'!*#*\e(B]\e$(5"p
\e(B\\|
[\e$
(5!!\e(B-\e$
(5$~
\e(B]")
1196 (put 'indian-2-column-to-ucs-chartable 'char-table-extra-slots 1)
1197 (defconst indian-2-column-to-ucs-chartable
1198 (let ((table (make-char-table 'indian-2-column-to-ucs-chartable))
1200 (dolist (elt indian-2-colum-to-ucs)
1201 (if (= (length (car elt)) 1)
1202 (aset table (aref (car elt) 0) (cdr elt))
1203 (setq alist (cons elt alist))))
1204 (set-char-table-extra-slot table 0 alist)
1207 (defun indian-2-column-to-ucs-region (from to)
1208 "Convert old Emacs Devanagari characters to UCS.
"
1213 (alist (char-table-extra-slot indian-2-column-to-ucs-chartable 0)))
1214 (narrow-to-region from to)
1215 (decompose-region from to)
1216 (goto-char (point-min))
1217 (while (re-search-forward indian-2-column-to-ucs-regexp nil t)
1218 (let ((len (- (match-end 0) (match-beginning 0)))
1221 (setq subst (aref indian-2-column-to-ucs-chartable
1222 (char-after (match-beginning 0))))
1223 (setq subst (cdr (assoc (match-string 0) alist))))
1224 (replace-match (if subst subst "?
"))))
1225 (indian-compose-region (point-min) (point-max))))))
1228 (defun indian-glyph-char (index &optional script)
1229 "Return character of charset
`indian-glyph
' made from glyph index INDEX.
1230 The variable
`indian-default-script
' specifies the script of the glyph.
1231 Optional argument SCRIPT
, if non-nil
, overrides
`indian-default-script
'.
1232 See also the function
`indian-char-glyph
'.
"
1234 (setq script indian-default-script))
1235 (let ((offset (get script 'indian-glyph-code-offset)))
1236 (or (integerp offset)
1237 (error "Invalid script name
: %s
" script))
1238 (or (and (>= index 0) (< index 256))
1239 (error "Invalid glyph index
: %d
" index))
1240 (setq index (+ offset index))
1241 (make-char 'indian-glyph (+ (/ index 96) 32) (+ (% index 96) 32))))
1243 (defvar indian-glyph-max-char
1245 255 (aref indian-script-table (1- (length indian-script-table))))
1246 "The maximum valid code of characters in the charset
`indian-glyph
'.
")
1249 (defun indian-char-glyph (char)
1250 "Return information about the glyph code for CHAR of
`indian-glyph
' charset.
1251 The value is
(INDEX . SCRIPT
), where INDEX is the glyph index
1252 in the font that Indian script name SCRIPT specifies.
1253 See also the function
`indian-glyph-char
'.
"
1254 (let ((split (split-char char))
1256 (or (eq (car split) 'indian-glyph)
1257 (error "Charset of
`%c
' is not indian-glyph
" char))
1258 (or (<= char indian-glyph-max-char)
1259 (error "Invalid indian-glyph char
: %d
" char))
1260 (setq code (+ (* (- (nth 1 split) 32) 96) (nth 2 split) -32))
1261 (cons (% code 256) (aref indian-script-table (/ code 256)))))
1265 ;;; arch-tag: 59aacd71-46c2-4cb3-bb26-e12bbad55545
1266 ;;; ind-util.el ends here