1 ;;; thai.el --- support for Thai -*- coding: iso-2022-7bit; -*-
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 2002 Free Software Foundation, Inc.
7 ;; Keywords: multilingual, Thai, i18n
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
28 ;; For Thai, the character set TIS620 is supported.
32 (define-coding-system 'thai-tis620
33 "8-bit encoding for ASCII (MSB=0) and Thai TIS620 (MSB=1)."
36 :charset-list '(tis620-2533))
38 (define-coding-system-alias 'th-tis620 'thai-tis620)
39 (define-coding-system-alias 'tis620 'thai-tis620)
40 (define-coding-system-alias 'tis-620 'thai-tis620)
42 (set-language-info-alist
43 "Thai" '((tutorial . "TUTORIAL.th")
45 (coding-system thai-tis620 iso-8859-11 cp874)
46 (coding-priority thai-tis620)
47 (nonascii-translation . tis620-2533)
48 (input-method . "thai-kesmanee")
49 (unibyte-display . thai-tis620)
52 . (thai-compose-string
53 (copy-sequence "Thai (
\e,T@RIRd7B
\e(B)
\e,TJGQJ4U$CQ:
\e(B,
\e,TJGQJ4U$hP
\e(B")))
57 (define-coding-system 'cp874
58 "DOS codepage 874 (Thai)"
61 :charset-list '(cp874)
63 (define-coding-system-alias 'ibm874 'cp874)
65 (define-coding-system 'iso-8859-11
66 "ISO/IEC 8859/11 (Latin/Thai)
67 This is the same as `thai-tis620' with the addition of no-break-space."
70 :mime-charset 'iso-8859-11 ; not actually registered as of 2002-05-24
71 :charset-list '(iso-8859-11))
73 ;; For automatic composition.
74 (let ((chars "
\e,TQTUVWXYZghijklmn
\e(B"))
75 (dotimes (i (length chars))
76 (aset composition-function-table (aref chars i)
77 'thai-composition-function)))