-;;; viet-util.el --- utilities for Vietnamese
+;;; viet-util.el --- utilities for Vietnamese -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1995 Free Software Foundation, Inc.
;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
+;; Licensed to the Free Software Foundation.
;; Keywords: mule, multilingual, Vietnamese
;; Vietnamese uses ASCII characters and additional 134 unique
;; characters (these are Latin alphabets with various diacritical and
-;; tone marks). As far as I know, Vietnamese now has 4 different ways
-;; for representing these characters: VISCII, VSCII, VIQR, and
-;; Unicode. VISCII and VSCII are simple 1-byte code which assigns 134
-;; unique characters in control-code area (0x00..0x1F) and right half
-;; area (0x80..0xFF). VIQR is a menmonic encoding specification
-;; representing diacritical marks by following ASCII characters.
+;; tone marks). As far as I know, Vietnamese now has 5 different ways
+;; for representing these characters: VISCII, TCVN-5712, VPS, VIQR,
+;; and Unicode. VISCII, TCVN-5712 and VPS are simple 1-byte code
+;; which assigns 134 unique characters in control-code area
+;; (0x00..0x1F) and right half area (0x80..0xFF). VIQR is a menmonic
+;; encoding specification representing diacritical marks by following
+;; ASCII characters.
;;; Code:
+;;;###autoload
+(defun viet-encode-viscii-char (char)
+ "Return VISCII character code of CHAR if appropriate."
+ (aref (char-table-extra-slot viet-viscii-nonascii-translation-table 0)
+ char))
+
;; VIQR is a menmonic encoding specification for Vietnamese.
;; It represents diacritical marks by ASCII characters as follows:
;; ------------+----------+--------
;;;###autoload
(defun viet-decode-viqr-region (from to)
- "Convert `VIQR' mnemonics of the current region to Vietnamese characaters.
+ "Convert `VIQR' mnemonics of the current region to Vietnamese characters.
When called from a program, expects two arguments,
positions (integers or markers) specifying the stretch of the region."
(interactive "r")
;;;###autoload
(defun viet-decode-viqr-buffer ()
- "Convert `VIQR' mnemonics of the current buffer to Vietnamese characaters."
+ "Convert `VIQR' mnemonics of the current buffer to Vietnamese characters."
(interactive)
(viet-decode-viqr-region (point-min) (point-max)))
;;;###autoload
(defun viet-encode-viqr-region (from to)
- "Convert Vietnamese characaters of the current region to `VIQR' mnemonics.
+ "Convert Vietnamese characters of the current region to `VIQR' mnemonics.
When called from a program, expects two arguments,
positions (integers or markers) specifying the stretch of the region."
(interactive "r")
;;;###autoload
(defun viet-encode-viqr-buffer ()
- "Convert Vietnamese characaters of the current buffer to `VIQR' mnemonics."
+ "Convert Vietnamese characters of the current buffer to `VIQR' mnemonics."
(interactive)
(viet-encode-viqr-region (point-min) (point-max)))
;;;###autoload
(defun viqr-pre-write-conversion (from to)
- (let ((old-buf (current-buffer))
- (work-buf (get-buffer-create " *viet-work*")))
- (set-buffer work-buf)
- (erase-buffer)
+ (let ((old-buf (current-buffer)))
+ (set-buffer (generate-new-buffer " *temp*"))
(if (stringp from)
(insert from)
(insert-buffer-substring old-buf from to))
nil))
;;;
-(provide 'language/viet-util)
+(provide 'viet-util)
-;;; Local Variables:
-;;; generated-autoload-file: "../loaddefs.el"
-;;; End:
+;;; arch-tag: 082a4d3b-168f-45b4-b3e1-82bfa1b5a194
;;; viet-util.el ends here