#940884 anthy: garbled characters with anthy.el

Package:
anthy
Source:
anthy
Description:
Japanese kana-kanji conversion - utilities
Submitter:
Nobutaka Mantani
Date:
2020-12-14 16:24:04 UTC
Severity:
important
#940884#5
Date:
2019-09-21 12:50:41 UTC
From:
To:
Hi, I use anthy-0.4 on FreeBSD (sorry I am not a Debian user).
When I input a numeral or a symbol on Emacs with anthy.el, the input
becomes garbled characters ("1" becomes "鐚\221", "!" becomes "鐚\201"
and so on). A Debian user also reported the same problem at the 5ch BBS.

https://mao.5ch.net/test/read.cgi/linux/1565609547/94-
https://mevius.5ch.net/test/read.cgi/unix/1514601894/751-

I use FreeBSD with UTF-8 locale and Emacs with UTF-8 coding system.

It seems that anthy-agent returns numerals and symbols with UTF-8
and other characters with EUC-JP. Converting character encoding of
src-util/rkhelper.c from UTF-8 to EUC-JP fixes the problem.

Thank you for maintaining anthy.

#940884#10
Date:
2020-12-14 16:24:27 UTC
From:
To:
Hi,

(a) In UTF-8 env, most characters are broken
(b) In euc-jp env, numerals and symbols are broken

How to reproduce:
 a-1. Run emacs with LANG=ja_JP.UTF-8 or LANG=C.UTF-8
 a-2. Set input method to japanese-anthy (C-x RET C-\ japanese-anthy)
 a-3. Switch buffer to scratch (C-x b *scratch*)
 a-4. Enable input-method (C-\)
 a-5. Hit '1' 'a'
 a-6. It should show "|1あ", but you see broken characters "|1\244\242"

 b-1. Run emacs with LANG=ja_JP.eucJP
 (b-2 - b-5 : same as a-2 - a-5)
 b-6. It should show "|1あ", but you see broken characters "|鐚\221あ"


Regards,
Nobuhiro Ban