JOHAB encoder is incomplete

Bruno Haible haible@ilog.fr
Mon Dec 20 07:38:00 GMT 1999


Hello,

In glibc-2.1.1, the JOHAB decoder can not encode valid text. To reproduce:

Take some given text in Johab:
$ printf 'Korean (\xD0\x65\x8B\x69)\x09\x09\x09\xB4\x65\x91\x77\xD0\x61\xAD\x41\xB6\x61, \xB4\x65\x91\x77\xD0\x61\xAF\xB3\x93\xA1\x8C\x61\n\x09KSC  -- \xF0\x3A\xE3\xA8  \xE0\xD2\xE8\xA1\n' > x

Convert it to UTF-8:
$ iconv -f JOHAB -t UTF-8 < x > y

Convert it back to JOHAB:
$ iconv -f UTF-8 -t JOHAB < y > z
iconv: illegal input sequence at position 8

Bruno


More information about the Libc-alpha mailing list