GNU bug report logs -
#47767
28.0.50; japanese-hankaku unnatural or misconversion results
Previous Next
Reported by: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Date: Wed, 14 Apr 2021 09:03:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47767 in the body.
You can then email your comments to 47767 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#47767
; Package
emacs
.
(Wed, 14 Apr 2021 09:03:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 14 Apr 2021 09:03:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Added tag(s) patch.
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Wed, 21 Apr 2021 00:03:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#47767
; Package
emacs
.
(Wed, 05 May 2021 15:11:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 47767 <at> debbugs.gnu.org (full text, mbox):
Kazuhiro Ito <kzhr <at> 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
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 05 May 2021 15:11:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
47767 <at> debbugs.gnu.org and Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 05 May 2021 15:11:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 03 Jun 2021 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.