nkf in RHEL6 can't convert correctly some SJIS charactors to JIS using --oc=ISO-2022-JP.

Solution In Progress - Updated -

Issue

  • nkf in RHEL6 can't convert correctly some SJIS characters to JIS using --oc=ISO-2022-JP, although the same package in RHEL5 can do this as expected.

  • Here is an example of SJIS character.

[root@rhel5 ~]$ echo 0 fa 40 | xxd -rp
  • Result on RHEL5 is expected.
[root@rhel5 ~]# echo 0 fa 40 | xxd -rp | nkf --oc=ISO-2022-JP | hexdump -Cv
00000000  1b 24 42 7c 71 1b 28 42                           |.$B|q.(B|
00000008
  • Result on RHEL6 is different from the above.
[root@rhel6 ~]# echo 0 fa 40 | xxd -rp | nkf --oc=ISO-2022-JP | hexdump -Cv
00000000  1b 24 42 7a 40 1b 28 42                           |.$Bz@.(B|
00000008

Environment

  • Red Hat Enterprise Linux 6
  • nkf-2.0.8b-6.2.el6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content