Commit | Line | Data |
---|---|---|
60370d40 | 1 | ;;; vietnamese.el --- support for Vietnamese -*- coding: iso-2022-7bit; -*- |
4ed46869 | 2 | |
95df8112 | 3 | ;; Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc. |
7976eda0 | 4 | ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
5df4f04c | 5 | ;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 |
eaa61218 KH |
6 | ;; National Institute of Advanced Industrial Science and Technology (AIST) |
7 | ;; Registration Number H14PRO021 | |
8f924df7 KH |
8 | ;; Copyright (C) 2003 |
9 | ;; National Institute of Advanced Industrial Science and Technology (AIST) | |
10 | ;; Registration Number H13PRO009 | |
4ed46869 | 11 | |
a4584db2 | 12 | ;; Keywords: multilingual, Vietnamese, i18n |
4ed46869 KH |
13 | |
14 | ;; This file is part of GNU Emacs. | |
15 | ||
4936186e | 16 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
4ed46869 | 17 | ;; it under the terms of the GNU General Public License as published by |
4936186e GM |
18 | ;; the Free Software Foundation, either version 3 of the License, or |
19 | ;; (at your option) any later version. | |
4ed46869 KH |
20 | |
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. | |
25 | ||
26 | ;; You should have received a copy of the GNU General Public License | |
4936186e | 27 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
4ed46869 KH |
28 | |
29 | ;;; Commentary: | |
30 | ||
8350f087 | 31 | ;; For Vietnamese, the character sets VISCII, VSCII and TCVN-5712 are |
bd465aec | 32 | ;; supported. |
4ed46869 KH |
33 | |
34 | ;;; Code: | |
35 | ||
e1915ab3 KH |
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) | |
f11f47e0 KH |
41 | :mime-charset 'viscii |
42 | :suitable-for-file-name t) | |
4ed46869 | 43 | |
2e21aa27 | 44 | (define-coding-system-alias 'viscii 'vietnamese-viscii) |
4b9121fc | 45 | |
e1915ab3 KH |
46 | (define-coding-system 'vietnamese-vscii |
47 | "8-bit encoding for Vietnamese VSCII-1." | |
48 | :coding-type 'charset | |
49 | :mnemonic ?v | |
f11f47e0 KH |
50 | :charset-list '(vscii) |
51 | :suitable-for-file-name t) | |
4ed46869 | 52 | |
2e21aa27 | 53 | (define-coding-system-alias 'vscii 'vietnamese-vscii) |
4b9121fc | 54 | |
bd465aec PJ |
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)))) | |
a1506d29 | 61 | ;; |
bd465aec PJ |
62 | ;; (define-coding-system-alias 'vps 'vietnamese-vps) |
63 | ||
e1915ab3 KH |
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) | |
4b9121fc | 71 | |
2e21aa27 | 72 | (define-coding-system-alias 'viqr 'vietnamese-viqr) |
4ed46869 | 73 | |
4ed46869 | 74 | (set-language-info-alist |
e1915ab3 | 75 | "Vietnamese" `((charset viscii) |
a79a3c79 | 76 | (coding-system vietnamese-viscii vietnamese-vscii |
8f924df7 | 77 | vietnamese-tcvn vietnamese-viqr windows-1258) |
e1915ab3 | 78 | (nonascii-translation . viscii) |
a79a3c79 | 79 | (coding-priority vietnamese-viscii) |
a564ccf9 KH |
80 | (input-method . "vietnamese-viqr") |
81 | (unibyte-display . vietnamese-viscii) | |
82 | (features viet-util) | |
dc09922d | 83 | (sample-text . "Vietnamese (Ti\e,1*\e(Bng Vi\e,1.\e(Bt) Ch\e,1`\e(Bo b\e,1U\e(Bn") |
335a7ad7 | 84 | (documentation . "\ |
ae0fa1e0 | 85 | For Vietnamese, Emacs uses special charsets internally. |
8f924df7 | 86 | They can be decoded from and encoded to VISCII, VSCII, TCVN-5712, VIQR |
c5e87d10 | 87 | and windows-1258. VSCII is deprecated in favor of TCVN-5712. The |
8f924df7 | 88 | Current setting gives higher priority to the coding system VISCII than |
d3f35208 DL |
89 | TCVN-5712. If you prefer TCVN-5712, please do: (prefer-coding-system |
90 | 'vietnamese-tcvn). There are two Vietnamese input methods: VIQR and | |
8f924df7 | 91 | Telex, VIQR is the default setting."))) |
4ed46869 | 92 | |
a4584db2 DL |
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) | |
100 | ||
d3f35208 DL |
101 | (define-coding-system 'vietnamese-tcvn |
102 | "8-bit encoding for Vietnamese TCVN-5712" | |
103 | :coding-type 'charset | |
104 | :mnemonic ?t | |
f11f47e0 KH |
105 | :charset-list '(tcvn-5712) |
106 | :suitable-for-file-name t) | |
d3f35208 | 107 | (define-coding-system-alias 'tcvn 'vietnamese-tcvn) |
6a2bd1a5 | 108 | (define-coding-system-alias 'tcvn-5712 'vietnamese-tcvn) |
4ed46869 | 109 | |
41da80b1 DL |
110 | (provide 'vietnamese) |
111 | ||
4ed46869 | 112 | ;;; vietnamese.el ends here |