*** empty log message ***
[bpt/emacs.git] / lisp / language / vietnamese.el
1 ;;; vietnamese.el --- support for Vietnamese -*- coding: iso-2022-7bit; -*-
2
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 2002 Free Software Foundation, Inc.
6 ;; Copyright (C) 2003
7 ;; National Institute of Advanced Industrial Science and Technology (AIST)
8 ;; Registration Number H13PRO009
9
10 ;; Keywords: multilingual, Vietnamese, i18n
11
12 ;; This file is part of GNU Emacs.
13
14 ;; GNU Emacs is free software; you can redistribute it and/or modify
15 ;; it under the terms of the GNU General Public License as published by
16 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; any later version.
18
19 ;; GNU Emacs is distributed in the hope that it will be useful,
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;; GNU General Public License for more details.
23
24 ;; You should have received a copy of the GNU General Public License
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
26 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27 ;; Boston, MA 02111-1307, USA.
28
29 ;;; Commentary:
30
31 ;; For Vietnames, the character sets VISCII, VSCII and TCVN-5712 are
32 ;; supported.
33
34 ;;; Code:
35
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
43 (define-coding-system-alias 'viscii 'vietnamese-viscii)
44
45 (define-coding-system 'vietnamese-vscii
46 "8-bit encoding for Vietnamese VSCII-1."
47 :coding-type 'charset
48 :mnemonic ?v
49 :charset-list '(vscii))
50
51 (define-coding-system-alias 'vscii 'vietnamese-vscii)
52
53 ;; (make-coding-system
54 ;; 'vietnamese-vps 4 ?p
55 ;; "8-bit encoding for Vietnamese VPS"
56 ;; '(ccl-decode-vps . ccl-encode-vps)
57 ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
58 ;; (valid-codes (0 . 255))))
59 ;;
60 ;; (define-coding-system-alias 'vps 'vietnamese-vps)
61
62 (define-coding-system 'vietnamese-viqr
63 "Vietnamese latin transcription (VIQR)."
64 :coding-type 'utf-8
65 :mnemonic ?q
66 :charset-list '(ascii viscii)
67 :post-read-conversion 'viqr-post-read-conversion
68 :pre-write-conversion 'viqr-pre-write-conversion)
69
70 (define-coding-system-alias 'viqr 'vietnamese-viqr)
71
72 (set-language-info-alist
73 "Vietnamese" `((charset viscii)
74 (coding-system vietnamese-viscii vietnamese-vscii
75 vietnamese-tcvn vietnamese-viqr windows-1258)
76 (nonascii-translation . viscii)
77 (coding-priority vietnamese-viscii)
78 (input-method . "vietnamese-viqr")
79 (unibyte-display . vietnamese-viscii)
80 (features viet-util)
81 (sample-text . "Vietnamese (Ti\e,1*\e(Bng Vi\e,1.\e(Bt) Ch\e,1`\e(Bo b\e,1U\e(Bn")
82 (documentation . "\
83 For Vietnamese, Emacs uses special charsets internally.
84 They can be decoded from and encoded to VISCII, VSCII, TCVN-5712, VIQR
85 and windows-1258. VSCII is deprecated in favour of TCVN-5712. The
86 Current setting gives higher priority to the coding system VISCII than
87 TCVN-5712. If you prefer TCVN-5712, please do: (prefer-coding-system
88 'vietnamese-tcvn). There are two Vietnamese input methods: VIQR and
89 Telex, VIQR is the default setting.")))
90
91 (define-coding-system 'windows-1258
92 "windows-1258 encoding for Vietnamese (MIME: WINDOWS-1258)"
93 :coding-type 'charset
94 :mnemonic ?*
95 :charset-list '(windows-1258)
96 :mime-charset 'windows-1258)
97 (define-coding-system-alias 'cp1258 'windows-1258)
98
99 (define-coding-system 'vietnamese-tcvn
100 "8-bit encoding for Vietnamese TCVN-5712"
101 :coding-type 'charset
102 :mnemonic ?t
103 :charset-list '(tcvn-5712))
104 (define-coding-system-alias 'tcvn 'vietnamese-tcvn)
105
106 (provide 'vietnamese)
107
108 ;;; vietnamese.el ends here