;;; japan-util.el --- utilities for Japanese -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-;; Free Software Foundation, Inc.
+;; Copyright (C) 2001-2016 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009
+;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
(?\e$B!-\e(B ?') (?\e$B!.\e(B ?`) (?\e$B!0\e(B ?^) (?\e$B!2\e(B ?_) (?\e$B!<\e(B ?- ?\e(I0\e(B) (?\e$B!=\e(B ?-) (?\e$B!>\e(B ?-)
(?\e$B!?\e(B ?/) (?\e$B!@\e(B ?\\) (?\e$B!A\e(B ?~) (?\e$B!C\e(B ?|) (?\e$B!F\e(B ?`) (?\e$B!G\e(B ?') (?\e$B!H\e(B ?\") (?\e$B!I\e(B ?\")
(?\\e$B!J\e(B ?\() (?\\e$B!K\e(B ?\)) (?\\e$B!N\e(B ?[) (?\\e$B!O\e(B ?]) (?\\e$B!P\e(B ?{) (?\\e$B!Q\e(B ?})
- (?\e$B!R\e(B ?<) (?\e$B!S\e(B ?>) (?\\e$B!V\e(B nil ?\\e(I"\e(B) (?\\e$B!W\e(B nil ?\\e(I#\e(B)
+ (?\e$B!R\e(B ?<) (?\e$B!S\e(B ?>) (?\\e$B!V\e(B nil ?\\e(I"\e(B) (?\\e$B!W\e(B nil ?\\e(I#\e(B)
(?\e$B!\\e(B ?+) (?\e$B!]\e(B ?-) (?\e$B!a\e(B ?=) (?\e$B!c\e(B ?<) (?\e$B!d\e(B ?>)
(?\e$B!l\e(B ?') (?\e$B!m\e(B ?\") (?\e$B!o\e(B ?\\) (?\e$B!p\e(B ?$) (?\e$B!s\e(B ?%) (?\e$B!t\e(B ?#) (?\e$B!u\e(B ?&) (?\e$B!v\e(B ?*)
(?\e$B!w\e(B ?@)
;; cp932-2-byte
(#x2015 ?-) (#xFF5E ?~) (#xFF0D ?-))
- "Japanese JISX0208 symbol character table.
+ "Japanese JISX0208 and CP932 symbol character table.
Each element is of the form (SYMBOL ASCII HANKAKU), where SYMBOL
-belongs to `japanese-jisx0208', ASCII belongs to `ascii', and HANKAKU
-belongs to `japanese-jisx0201-kana'.")
+belongs to `japanese-jisx0208' or `cp932', ASCII belongs to `ascii',
+and HANKAKU belongs to `japanese-jisx0201-kana'.")
;; Put properties 'jisx0208, 'jisx0201, and 'ascii to each Japanese
;; symbol and ASCII characters for conversion among them.
(if ascii
(progn
(put-char-code-property jisx0208 'ascii ascii)
- (put-char-code-property ascii 'jisx0208 jisx0208)))
+ (if (encode-char jisx0208 'japanese-jisx0208)
+ (put-char-code-property ascii 'jisx0208 jisx0208))))
(if jisx0201
(progn
(put-char-code-property jisx0208 'jisx0201 jisx0201)
- (put-char-code-property jisx0201 'jisx0208 jisx0208)))))
+ (if (encode-char jisx0208 'japanese-jisx0208)
+ (put-char-code-property jisx0201 'jisx0208 jisx0208))))))
(defconst japanese-alpha-numeric-table
'((?\e$B#0\e(B . ?0) (?\e$B#1\e(B . ?1) (?\e$B#2\e(B . ?2) (?\e$B#3\e(B . ?3) (?\e$B#4\e(B . ?4)
The argument may be a character or string. The result has the same type.
The argument object is not altered--the value is a copy.
Optional argument HANKAKU t means to convert to `hankaku' Katakana
- \(`japanese-jisx0201-kana'), in which case return value
- may be a string even if OBJ is a character if two Katakanas are
- necessary to represent OBJ."
+\(`japanese-jisx0201-kana'), in which case return value
+may be a string even if OBJ is a character if two Katakanas are
+necessary to represent OBJ."
(if (stringp obj)
(japanese-string-conversion obj 'japanese-katakana-region hankaku)
(or (get-char-code-property obj (if hankaku 'jisx0201 'katakana))
;;
(provide 'japan-util)
-;; arch-tag: b579595c-c9ad-4b57-9314-98cd8b214f89
;;; japan-util.el ends here