2c27c42ecfa86e4a55144c07ea08635e670a000a
[chise/xemacs-chise.git-] / lisp / mule / 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) 1997,2000 MORIOKA Tomohiko
6
7 ;; Keywords: multilingual, Vietnamese
8
9 ;; This file is part of XEmacs.
10
11 ;; XEmacs is free software; you can redistribute it and/or modify it
12 ;; 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.
15
16 ;; XEmacs is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 ;; General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with XEmacs; see the file COPYING.  If not, write to the Free
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24 ;; 02111-1307, USA.
25
26 ;;; Commentary:
27
28 ;; For Vietnames, the character sets VISCII and VSCII are supported.
29
30 ;;; Code:
31
32 (when (featurep 'utf-2000)
33   (make-coding-system
34    'vscii-2 'iso2022
35    "TCVN 5712 (VSCII 2)."
36    '(charset-g0 ascii
37                 charset-g1 latin-tcvn5712
38                 charset-g2 t ;; unspecified but can be used later.
39                 short t
40                 mnemonic "VIET/ISO8"
41                 composite t))
42   (define-coding-system-alias 'tcvn-5712 'vscii-2)
43   )
44
45 ;;; [tomo] CCL based implementations were moved into viet-ccl.el.
46
47 (make-coding-system
48  'viqr 'no-conversion
49  "Coding-system used for VIQR."
50  '(mnemonic "VIQR"
51    eol-type lf
52    post-read-conversion viqr-post-read-conversion
53    pre-write-conversion viqr-pre-write-conversion))
54
55 ;; (make-coding-system
56 ;;  'vietnamese-viqr 0 ?q
57 ;;  "Vietnamese latin transcription (VIQR)"
58 ;;  nil
59 ;;  '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
60 ;;    (post-read-conversion . viqr-post-read-conversion)
61 ;;    (pre-write-conversion . viqr-pre-write-conversion)
62 ;;    (charset-origin-alist
63 ;;     (vietnamese-viscii-lower "VISCII" viet-encode-viscii-char)
64 ;;     (vietnamese-viscii-upper "VISCII" viet-encode-viscii-char))))
65
66 ;; (define-coding-system-alias 'viqr 'vietnamese-viqr)
67
68 (set-language-info-alist
69  "Vietnamese" `((charset vietnamese-viscii-lower vietnamese-viscii-upper)
70                 ,(if (find-coding-system 'vscii-2)
71                      ;; viscii will be supported in UTF-2000
72                      '(coding-system vscii-2 viqr)
73                    '(coding-system viscii vscii viqr))
74                 ,(if (find-coding-system 'vscii-2)
75                      '(coding-priority vscii-2)
76                    '(coding-priority viscii))
77                 (input-method . "vietnamese-viqr")
78                 (features viet-util)
79                 (sample-text . "Vietnamese (Ti\e,1*\e(Bng Vi\e,1.\e(Bt)     Ch\e,A`\e(Bo b\e,1U\e(Bn")
80                 (documentation . "\
81 For Vietnamese, Emacs uses special charasets internally.
82 They can be decoded from and encoded to VISCC, VSCII, and VIQR.
83 Current setting put higher priority to the coding system VISCII than VSCII.
84 If you prefer VSCII, please do: (prefer-coding-system 'vietnamese-vscii)")
85                 ))
86
87 ;;; vietnamese.el ends here