in reply to Converting from UTF8->EUC-JP
it looks like you need to inform Encode of the current encoding of your text somehow.$ perl -e 'print "\x30\x4b","\x00\x0a"' | iconv -f utf-16be -t utf-8 | + perl -MEncode=encode,decode -e '$x=<>;print encode("euc-jp",decode(" +utf8",$x))' | xxd 0000000: a4ab 0a ... $ gzcat /usr/share/i18n/charmaps/EUC-JP.gz | fgrep U304B <U304B> /xa4/xab HIRAGANA LETTER KA
|
|---|