Merge r21-4-11-chise-0_20-=ucs.
[chise/xemacs-chise.git.1] / 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   (define-coding-system-alias 'tcvn-5712 'vscii-2)
42   )
43
44 ;;; [tomo] CCL based implementations were moved into viet-ccl.el.
45
46 (make-coding-system
47  'viqr 'no-conversion
48  "Coding-system used for VIQR."
49  '(mnemonic "VIQR"
50    eol-type lf
51    post-read-conversion viqr-post-read-conversion
52    pre-write-conversion viqr-pre-write-conversion))
53
54 ;; (make-coding-system
55 ;;  'vietnamese-viqr 0 ?q
56 ;;  "Vietnamese latin transcription (VIQR)"
57 ;;  nil
58 ;;  '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
59 ;;    (post-read-conversion . viqr-post-read-conversion)
60 ;;    (pre-write-conversion . viqr-pre-write-conversion)
61 ;;    (charset-origin-alist
62 ;;     (vietnamese-viscii-lower "VISCII" viet-encode-viscii-char)
63 ;;     (vietnamese-viscii-upper "VISCII" viet-encode-viscii-char))))
64
65 ;; (define-coding-system-alias 'viqr 'vietnamese-viqr)
66
67 (set-language-info-alist
68  "Vietnamese" `((charset vietnamese-viscii-lower vietnamese-viscii-upper)
69                 ,(if (find-coding-system 'vscii-2)
70                      ;; viscii will be supported in UTF-2000
71                      '(coding-system vscii-2 viqr)
72                    '(coding-system viscii vscii viqr))
73                 ,(if (find-coding-system 'vscii-2)
74                      '(coding-priority vscii-2)
75                    '(coding-priority viscii))
76                 (input-method . "vietnamese-viqr")
77                 (features viet-util)
78                 (sample-text . "Vietnamese (Ti\e,1*\e(Bng Vi\e,1.\e(Bt)     Ch\e,A`\e(Bo b\e,1U\e(Bn")
79                 (documentation . "\
80 For Vietnamese, Emacs uses special charsets internally.
81 They can be decoded from and encoded to VISCC, VSCII, and VIQR.
82 Current setting put higher priority to the coding system VISCII than VSCII.
83 If you prefer VSCII, please do: (prefer-coding-system 'vietnamese-vscii)")
84                 ))
85
86 ;;; vietnamese.el ends here