Update copyright year to 2014 by running admin/update-copyright.
[emacs.git] / lisp / language / vietnamese.el
blobf568ea8e3133ce05d0570ef05cb959ad38df862a
1 ;;; vietnamese.el --- support for Vietnamese -*- coding: utf-8; -*-
3 ;; Copyright (C) 1998, 2001-2014 Free Software Foundation, Inc.
4 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 ;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
6 ;; National Institute of Advanced Industrial Science and Technology (AIST)
7 ;; Registration Number H14PRO021
8 ;; Copyright (C) 2003
9 ;; National Institute of Advanced Industrial Science and Technology (AIST)
10 ;; Registration Number H13PRO009
12 ;; Keywords: multilingual, Vietnamese, i18n
14 ;; This file is part of GNU Emacs.
16 ;; GNU Emacs is free software: you can redistribute it and/or modify
17 ;; it under the terms of the GNU General Public License as published by
18 ;; the Free Software Foundation, either version 3 of the License, or
19 ;; (at your option) any later version.
21 ;; GNU Emacs is distributed in the hope that it will be useful,
22 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;; GNU General Public License for more details.
26 ;; You should have received a copy of the GNU General Public License
27 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
29 ;;; Commentary:
31 ;; For Vietnamese, the character sets VISCII, VSCII and TCVN-5712 are
32 ;; supported.
34 ;;; Code:
36 (define-coding-system 'vietnamese-viscii
37 "8-bit encoding for Vietnamese VISCII 1.1 (MIME:VISCII)."
38 :coding-type 'charset
39 :mnemonic ?V
40 :charset-list '(viscii)
41 :mime-charset 'viscii
42 :suitable-for-file-name t)
44 (define-coding-system-alias 'viscii 'vietnamese-viscii)
46 (define-coding-system 'vietnamese-vscii
47 "8-bit encoding for Vietnamese VSCII-1."
48 :coding-type 'charset
49 :mnemonic ?v
50 :charset-list '(vscii)
51 :suitable-for-file-name t)
53 (define-coding-system-alias 'vscii 'vietnamese-vscii)
55 ;; (make-coding-system
56 ;; 'vietnamese-vps 4 ?p
57 ;; "8-bit encoding for Vietnamese VPS"
58 ;; '(ccl-decode-vps . ccl-encode-vps)
59 ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
60 ;; (valid-codes (0 . 255))))
62 ;; (define-coding-system-alias 'vps 'vietnamese-vps)
64 (define-coding-system 'vietnamese-viqr
65 "Vietnamese latin transcription (VIQR)."
66 :coding-type 'utf-8
67 :mnemonic ?q
68 :charset-list '(ascii viscii)
69 :post-read-conversion 'viqr-post-read-conversion
70 :pre-write-conversion 'viqr-pre-write-conversion)
72 (define-coding-system-alias 'viqr 'vietnamese-viqr)
74 (set-language-info-alist
75 "Vietnamese" `((charset viscii)
76 (coding-system vietnamese-viscii vietnamese-vscii
77 vietnamese-tcvn vietnamese-viqr windows-1258)
78 (nonascii-translation . viscii)
79 (coding-priority vietnamese-viscii)
80 (input-method . "vietnamese-viqr")
81 (unibyte-display . vietnamese-viscii)
82 (features viet-util)
83 (sample-text . "Vietnamese (Tiếng Việt) Chào bạn")
84 (documentation . "\
85 For Vietnamese, Emacs uses special charsets internally.
86 They can be decoded from and encoded to VISCII, VSCII, TCVN-5712, VIQR
87 and windows-1258. VSCII is deprecated in favor of TCVN-5712. The
88 Current setting gives higher priority to the coding system VISCII than
89 TCVN-5712. If you prefer TCVN-5712, please do: (prefer-coding-system
90 'vietnamese-tcvn). There are two Vietnamese input methods: VIQR and
91 Telex, VIQR is the default setting.")))
93 (define-coding-system 'windows-1258
94 "windows-1258 encoding for Vietnamese (MIME: WINDOWS-1258)"
95 :coding-type 'charset
96 :mnemonic ?*
97 :charset-list '(windows-1258)
98 :mime-charset 'windows-1258)
99 (define-coding-system-alias 'cp1258 'windows-1258)
101 (define-coding-system 'vietnamese-tcvn
102 "8-bit encoding for Vietnamese TCVN-5712"
103 :coding-type 'charset
104 :mnemonic ?t
105 :charset-list '(tcvn-5712)
106 :suitable-for-file-name t)
107 (define-coding-system-alias 'tcvn 'vietnamese-tcvn)
108 (define-coding-system-alias 'tcvn-5712 'vietnamese-tcvn)
110 (provide 'vietnamese)
112 ;;; vietnamese.el ends here