* bug#47767: 28.0.50; japanese-hankaku unnatural or misconversion results
@ 2021-04-14 9:01 Kazuhiro Ito
2021-05-05 15:10 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Kazuhiro Ito @ 2021-04-14 9:01 UTC (permalink / raw)
To: 47767
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#47767: 28.0.50; japanese-hankaku unnatural or misconversion results
2021-04-14 9:01 bug#47767: 28.0.50; japanese-hankaku unnatural or misconversion results Kazuhiro Ito
@ 2021-05-05 15:10 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-05 15:10 UTC (permalink / raw)
To: Kazuhiro Ito; +Cc: 47767
Kazuhiro Ito <kzhr@d1.dion.ne.jp> writes:
> 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.
Thanks; applied to Emacs 28.
I don't know Japanese, but since nobody else has piped up about this
patch in three weeks, I'm applying it. If other Japanese-speaking
people disagree with this patch, we can revert it.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-05 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-14 9:01 bug#47767: 28.0.50; japanese-hankaku unnatural or misconversion results Kazuhiro Ito
2021-05-05 15:10 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.