1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00
emacs/lisp/language/tibetan.el

614 lines
18 KiB
EmacsLisp
Raw Blame History

;;; tibetan.el --- support for Tibetan language -*- coding: utf-8-emacs; -*-
;; Copyright (C) 1997, 2001-2014 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
;; Copyright (C) 2003
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H13PRO009
;; Author: Toru TOMABECHI <Toru.Tomabechi@orient.unil.ch>
;; Created: Feb. 17. 1997
;; Keywords: multilingual, Tibetan, i18n
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; History:
;; 1997.03.13 Modification for special signs and punctuation.
;;; Commentary:
;;; Code:
;;; Tibetan Character set.
;;; \x2130 -- \x234a is a subset of Unicode v.2 \x0f00 - \x0fb9
;;; with a slight modification. And there are some subjoined
;;; consonants which are not specified in Unicode.
;;; I hope I can add missing characters later.
;;;
;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
;;;2120 // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ; obsolete glyphs (2123-5)
;;;2130 ༀ ༁ ༂ ༃ ༄ ༅ ༆ ༇ ༈ ༉ ༊ ་ ༌ ། ༎ ༏ ; Punctuation,
;;;2140 ༐ ༑ ༒ ༓ ༔ ༕ ༖ ༗ ༘ ༙ ༚ ༛ ༜ ༝ ༞ ༟ ; Digits and
;;;2150 ༠ ༡ ༢ ༣ ༤ ༥ ༦ ༧ ༨ ༩ ༪ ༫ ༬ ༭ ༮ ༯ ; Special signs.
;;;2160 ༰ ༱ ༲ ༳ ༴ ༵ ༶ ༷ ༸ ༹ ༺ ༻ ༼ ༽ ༾ ༿ ;
;;;2170 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> // ;
;;;
;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
;;;2220 // ཀ ཁ ག གྷ ང ཅ ཆ ཇ <20><><EFBFBD><EFBFBD> ཉ ཊ ཋ ཌ ཌྷ ཎ ; Base consonants
;;;2230 ཏ ཐ ད དྷ ན པ ཕ བ བྷ མ ཙ ཚ ཛ ཛྷ ཝ ཞ ; and
;;;2240 ཟ འ ཡ ར ལ ཤ ཥ ས ཧ ཨ ཀྵ ཪ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ; Vowel signs.
;;;2250 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ཱ ི ཱི ུ ཱུ ྲྀ ཷ ླྀ ཹ ེ ཻ ོ ཽ ཾ ; (\x2251 = vowel a)
;;;2260 ཿ ྀ ཱྀ ྂ ྃ ྄ ྅ ྆ ྇ ྈ ྉ ྊ ྋ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ; Long vowels and
;;;2270 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> // ; vocalic r, l ARE
;;; ; atomically
;;; ; encoded.
;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
;;;2320 // ྐ ྑ ྒ ྒྷ ྔ ྕ ྖ ྗ <20><><EFBFBD><EFBFBD> ྙ ྚ ྛ ྜ ྜྷ ྞ ; Subjoined consonants
;;;2330 ྟ ྠ ྡ ྡྷ ྣ ྤ ྥ ྦ ྦྷ ྨ ྩ ྪ ྫ ྫྷ ྭ ྮ ;
;;;2340 ྯ ྰ ྱ ྲ ླ ྴ ྵ ྶ ྷ ྸ ྐྵ ྺ ྻ ྼ <20><><EFBFBD><EFBFBD> ྾ ;
;;;2350 ྿ ࿀ ࿁ ࿂ ࿃ ࿄ ࿅ ࿆ ࿇ ࿈ ࿉ ࿊ ࿋ ࿌ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ; Hereafter, the chars
;;;2360 ࿏ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ; are not specified
;;;2370 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> // ; in Unicode.
;;;
;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
;;;2420 // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ; Precomposed
;;;2430 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ; consonants for
;;;2440 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ; ordinary Tibetan.
;;;2450 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ; They are decomposed
;;;2460 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ; into base and
;;;2470 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> // ; subjoined consonants
;;; ; when written on a
;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ; file in Tibetan
;;;2520 // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ; coding system.
;;;2530 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ;
;;;2540 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ;
;;;2550 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ;
;;;2560 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ;
;;;2570 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> // ;
;;;
(define-coding-system 'tibetan-iso-8bit
"8-bit encoding for ASCII (MSB=0) and TIBETAN (MSB=1)."
:coding-type 'iso-2022
:mnemonic ?Q
:designation [ascii tibetan nil nil]
:charset-list '(ascii tibetan))
(define-coding-system-alias 'tibetan 'tibetan-iso-8bit)
(set-language-info-alist
"Tibetan" '((charset tibetan tibetan-1-column)
(coding-system tibetan-iso-8bit)
(coding-priority iso-2022-7bit tibetan-iso-8bit)
(input-method . "tibetan-wylie")
(features tibet-util)
(documentation . t)
(sample-text . "Tibetan (བོད་སྐ<E0BDA6><E0BE90><EFBFBD><EFBFBD>ད་) ༄༅༅༎བཀྲ<E0BD80><E0BEB2><EFBFBD><EFBFBD>་ཤིས་བདེ་ལེགས༎ཨོཾ་མ<E0BC8B><E0BD98><EFBFBD><EFBFBD>་ཎི་པ<E0BC8B><E0BD94><EFBFBD><EFBFBD>དྨེ་ཧའུྂ༎")))
;; `འ' is included in the pattern for subjoined consonants because we
;; treat it specially in tibetan-add-components.
;; modified by Tomabechi 1999/12/10
;; modified by Tomabechi 2000/06/08
;; To allow infinite addition of vowels/modifiers
;; as specified in Unicode v.3
;; འ is removed from the class of subjoined. Tomabechi 2000/06/08
;; (for Unicode support)
(defconst tibetan-composable-pattern
"[ཀ-ཀྵཪ][ྐ-ྐྵྺྻྼ]*[཰<><E0BDB0><EFBFBD><EFBFBD>ཱི-྄ཱཽྀྀ]*[ཾྂྃ྆-ྋ༙༵༷]*"
"Regexp matching a composable sequence of Tibetan characters.")
;;;
;;; Definitions of conversion data.
;;;
;;; alists for tibetan char <-> transcription conversion
;;; longer transcription should come first
(defconst tibetan-consonant-transcription-alist
'(("tsh" . "")
("dzh" . "")
("kSH" . "")
("kh" . "")
("gh" . "")
("ng" . "")
("ch" . "")
("ny" . "")
("TH" . "")
("DH" . "")
("th" . "")
("dh" . "")
("ph" . "")
("bh" . "")
("ts" . "")
("dz" . "")
("zh" . "")
("sh" . "")
("SH" . "")
("k" . "")
("g" . "")
("c" . "")
("j" . "")
("T" . "")
("D" . "")
("N" . "")
("t" . "")
("d" . "")
("n" . "")
("p" . "")
("b" . "")
("m" . "")
("w" . "")
("z" . "")
("'" . "")
("y" . "")
("r" . "")
("l" . "")
("s" . "")
("h" . "")
("H" . "")
("A" . "")
;; Added by Tomabechi 1999/12/10
("R" . "") ;; fixed form RA
))
(defconst tibetan-vowel-transcription-alist
'(
;; Composite Vowels
;; Added by Tomabechi 2000/06/08
("frr" . "")
("fll" . "")
("fa" . "")
("fi" . "")
("fu" . "")
("fr" . "")
("fl" . "")
("fI" . "")
;; Normal Vowels
("ai" . "")
("au" . "")
("ee" . "")
("oo" . "")
("a" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") ; invisible vowel sign (\x2251)
("i" . "")
("u" . "")
("e" . "")
("o" . "")
("E" . "")
("O" . "")
("I" . "")
("," . "") ; idem.
))
(defconst tibetan-modifier-transcription-alist
'(("M" . "")
("~" . "")
("`" . "")
("x" . "")
("X" . "")
("v" . "")
("V" . "")
("q" . "")
("Q" . "")
("_/" . "")
("_o" . "")
("_O" . "")))
(defconst tibetan-precomposed-transcription-alist
'(("phyw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("tshw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rtsw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("khw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("nyw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("tsw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("zhw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("shw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("khy" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("phy" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("khr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("thr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("phr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("shr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("dzr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("grw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rng" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rny" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rts" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rdz" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rgw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rky" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rgy" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rmy" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("lng" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sng" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sny" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sts" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sky" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sgy" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("spy" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sby" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("smy" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("skr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sgr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("snr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("spr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sbr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("smr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("kw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("gw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("cw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("tw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("dw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("zw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("lw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("hw" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ky" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("gy" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("py" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("by" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("my" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("kr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("gr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("tr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("dr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("pr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("brk" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("brg" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("brng" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("brj" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("brny" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("brt" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("brd" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("brn" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("brts" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("brdz" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("brl" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("br" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("mr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("hr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("jr" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("kl" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("gl" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("blt" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("bld" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("bl" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("zl" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rl" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sl" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rk" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rg" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rj" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rt" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rd" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rn" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rb" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("rm" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("lk" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("lg" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("lc" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("lj" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("lt" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ld" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ln" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") ; dummy \x2121
("lp" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("lb" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("lh" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sk" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sg" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("st" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sd" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sn" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sp" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sb" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("sm" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"))
)
(defconst tibetan-subjoined-transcription-alist
(sort '(("+k" . "")
("+kh" . "")
("+g" . "")
("+gh" . "")
("+ng" . "")
("+c" . "")
("+ch" . "")
("+j" . "")
("+ny" . "")
("+T" . "")
("+TH" . "")
("+D" . "")
("+DH" . "")
("+N" . "")
("+t" . "")
("+th" . "")
("+d" . "")
("+dh" . "")
("+n" . "")
("+p" . "")
("+ph" . "")
("+b" . "")
("+bh" . "")
("+m" . "")
("+ts" . "")
("+tsh" . "")
("+dz" . "")
("+dzh" . "")
("+w" . "")
("+zh" . "")
("+z" . "")
("+'" . "")
("+y" . "")
("+r" . "")
("+l" . "")
("+sh" . "")
("+SH" . "")
("+s" . "")
("+h" . "")
("+A" . "")
("+kSH" . "")
;; Added by Tomabechi 1999/12/10
("+W" . "") ;; fixed form subscribed WA
("+Y" . "") ;; fixed form subscribed YA
("+R" . "") ;; fixed form subscribed RA
)
(lambda (x y) (> (length (car x)) (length (car y))))))
;;;
;;; alist for Tibetan base consonant <-> subjoined consonant conversion.
;;;
(defconst tibetan-base-to-subjoined-alist
'(("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
("" . "")
;; Added by Tomabechi 1999/12/10
("" . "") ;; Fixed form RA (224B->234D)
))
;;; alist for Tibetan composite vowels (long i, vocalic r, etc.)
;;; New variable. created by Tomabechi 2000/06/08
(defconst tibetan-composite-vowel-alist
'(;; LONG A
;; ("ཱ" . ((bc . tc) ?ཱ))
;; LONG I
("" . (?ཱ (tc . bc) ?ི))
;; LONG U
("" . (?ཱ (bc . tc) ?ུ))
;; VOCALIC R
("" . (?ྲ (tc . bc) ?ྀ))
;; LONG VOCALIC R
("" . (?ྲ (bc . tc) ?ཱ (tc . bc) ?ྀ))
;; VOCALIC L
("" . (?ླ (tc . bc) ?ྀ))
;;་LONG VOCALIC L
("" . (?ླ (bc . tc) ?ཱ (tc . bc) ?ྀ))
;; LONG REVERSE I
("" . (?ཱ (tc . bc) ?ྀ))
))
;;;
;;; alist for Tibetan consonantic components <-> precomposed glyph conversion.
;;; (includes some punctuation conversion rules)
;;;
(defconst tibetan-precomposition-rule-alist
`(("ཕྱྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("གྲྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཚྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྩྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྒྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྐྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྒྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྨྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྐྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྒྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྤྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྦྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྨྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྐྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྒྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྣྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྤྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྦྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྨྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཁྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཉྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཙྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཞྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཤྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཁྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཕྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཁྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཐྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཕྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཤྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཛྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྔ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྙ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྩ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྫ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ལྔ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྔ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྙ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྩ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཀྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("གྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཅྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཏྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("དྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཟྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ལྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཧྭ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཀྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("གྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("པྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("བྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("མྱ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཀྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("གྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཏྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("དྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("པྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("བྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("མྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཧྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཇྲ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཀླ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("གླ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("བླ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ཟླ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རླ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སླ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྐ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྒ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྗ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྟ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྡ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྣ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྦ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("རྨ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ལྐ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ལྒ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ལྣ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") ; dummy 0x2121 added 2000/06/08 for transition l -> lng
("ལྕ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ལྗ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ལྟ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ལྡ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ལྤ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ལྦ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("ལྷ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྐ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྒ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྟ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྡ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྣ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྤ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྦ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
("སྨ" . "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")))
(defconst tibetan-regexp
(let ((l (list tibetan-precomposed-transcription-alist
tibetan-consonant-transcription-alist
tibetan-vowel-transcription-alist
tibetan-modifier-transcription-alist
tibetan-subjoined-transcription-alist))
(separator "\\|")
tail pattern)
(while l
(setq tail (car l) l (cdr l))
(while tail
(setq pattern (cons separator (cons (car (car tail)) pattern))
tail (cdr tail))))
(apply 'concat (nreverse (cdr pattern))))
"Regexp matching a Tibetan transcription of a composable Tibetan sequence.
The result of matching is to be used for indexing alists at conversion
from a roman transcription to the corresponding Tibetan character.")
(defvar tibetan-precomposed-regexp
(purecopy
(let ((l tibetan-precomposed-transcription-alist)
temp)
(setq temp "^\\(")
(setq temp
(concat temp (car (car l))))
(setq l (cdr l))
(while l
(setq temp
(concat temp "\\|" (car (car l))))
(setq l (cdr l)))
(concat temp "\\)")))
"Regexp string to match a romanized Tibetan complex consonant.
The result of matching is to be used for indexing alists when the input key
from an input method is converted to the corresponding precomposed glyph.")
(defvar tibetan-precomposition-rule-regexp
(purecopy
(let ((l tibetan-precomposition-rule-alist)
temp)
(setq temp "\\(")
(setq temp (concat temp (car (car l))))
(setq l (cdr l))
(while l
(setq temp (concat temp "\\|" (car (car l))))
(setq l (cdr l)))
(concat temp "\\)")))
"Regexp string to match a sequence of Tibetan consonantic components, i.e.,
one base consonant and one or more subjoined consonants.
The result of matching is to be used for indexing alist when the component
sequence is converted to the corresponding precomposed glyph.
This also matches some punctuation characters which need conversion.")
(defvar tibetan-decomposed nil)
(defvar tibetan-decomposed-temp nil)
;; For automatic composition.
(set-char-table-range
composition-function-table '(#xF00 . #xFD1)
(list (vector tibetan-composable-pattern 0 'font-shape-gstring)))
(provide 'tibetan)
;;; tibetan.el ends here