bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47767: 28.0.50; japanese-hankaku unnatural or misconversion results


From: Kazuhiro Ito
Subject: bug#47767: 28.0.50; japanese-hankaku unnatural or misconversion results
Date: Wed, 14 Apr 2021 18:01:46 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.0.50 (x86_64-w64-mingw32) MULE/6.0 (HANACHIRUSATO)

1. japanese-hankaku[-region] with ASCII-ONLY option converts Japanese
panctuation characters and prolonged sound mark to ascii.

(japanese-hankaku "ケーキ、ドーナツ。" t)
-> "ケ-キ,ド-ナツ."

the result is very unnatural because "ー", "、" and "。" are normally
used among Japanese characters which are not converted to hankaku in
this case.  I hope they are kept as is (the result should be
"ケーキ、ドーナツ。").


2. japanese-hankaku[-region] without ASCII-ONLY option and
japanese-zenkaku[-region] fails to convert Latin punctuations.

(japanese-zenkaku "A, B, C.")
-> "A、 B、 C。"

(japanese-hankaku "A,B,C.")
-> "A、B、C。"

They should be "A, B, C." and "A,B,C." respectively.


Below patch fixes problems.


diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el
index 3f1fb2b749..8b80599d99 100644
--- a/lisp/language/japan-util.el
+++ b/lisp/language/japan-util.el
@@ -96,9 +96,9 @@ japanese-kana-table
          (put-char-code-property jisx0201 'jisx0208 katakana)))))
 
 (defconst japanese-symbol-table
-  '((?\  ?\ ) (?, ?, ?、) (?. ?. ?。) (?、 ?, ?、) (?。 ?. ?。) (?・ nil ?・)
+  '((?\  ?\ ) (?, ?,) (?. ?.) (?、 nil ?、) (?。 nil ?。) (?・ nil ?・)
     (?: ?:) (?; ?\;) (?? ??) (?! ?!) (?゛ nil ?゙) (?゜ nil ?゚)
-    (?´ ?') (?` ?`) (?^ ?^) (?_ ?_) (?ー ?- ?ー) (?— ?-) (?‐ ?-)
+    (?´ ?') (?` ?`) (?^ ?^) (?_ ?_) (?ー nil ?ー) (?— ?-) (?‐ ?-)
     (?/ ?/) (?\ ?\\) (?〜 ?~)  (?| ?|) (?‘ ?`) (?’ ?') (?“ ?\") (?” ?\")
     (?\( ?\() (?\) ?\)) (?\[ ?\[) (?\] ?\]) (?\{ ?{) (?\} ?})
     (?〈 ?<) (?〉 ?>) (?\「 nil ?\「) (?\」 nil ?\」)


-- 
Kazuhiro Ito





reply via email to

[Prev in Thread] Current Thread [Next in Thread]