(iso-8859-11): New coding system.
[emacs.git] / lisp / language / thai.el
blobc9674b28901b9314988f0f65281f6ee9a4546553
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)
14 ;; any later version.
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.
26 ;;; Commentary:
28 ;; For Thai, the character set TIS620 is supported.
30 ;;; Code:
32 (define-coding-system 'thai-tis620
33 "8-bit encoding for ASCII (MSB=0) and Thai TIS620 (MSB=1)."
34 :coding-type 'charset
35 :mnemonic ?T
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")
44 (charset thai-tis620)
45 (coding-system thai-tis620)
46 (coding-priority thai-tis620)
47 (nonascii-translation . tis620-2533)
48 (input-method . "thai-kesmanee")
49 (unibyte-display . thai-tis620)
50 (features thai-util)
51 (sample-text
52 . (thai-compose-string
53 (copy-sequence "Thai (\e,T@RIRd7B\e(B) \e,TJ\e0GQ\e1J\e04U\e1$\e0CQ\e1:\e(B, \e,TJ\e0GQ\e1J\e04U\e1\e0$h\e1P\e(B")))
54 (documentation . t)))
57 ;; Register a function to compose Thai characters.
58 (set-char-table-range composition-function-table
59 '(#x0E00 . #x0E7F)
60 '(("\\c0\\c4\\|\\c0\\(\\c2\\|\\c3\\)\\c4?"
61 . thai-composition-function)))
63 (define-coding-system 'cp874
64 "DOS codepage 874 (Thai)"
65 :coding-type 'charset
66 :mnemonic ?D
67 :charset-list '(cp874)
68 :mime-charset 'cp874)
69 (define-coding-system-alias 'ibm874 'cp874)
71 (define-coding-system 'iso-8859-11
72 "ISO/IEC 8859/11 (Latin/Thai)
73 This is the same as `thai-tis620' with the addition of no-break-space."
74 :coding-type 'charset
75 :mnemonic ?*
76 :mime-charset 'iso-8859-11 ; not actually registered as of 2002-05-24
77 :charset-list '(iso-8859-11))
79 (provide 'thai)
81 ;;; thai.el ends here