iconv problem

wynfield@gmail.com wynfield@gmail.com
Sat May 19 08:29:00 GMT 2012

Either there is a bug in cygwin's "iconv" utility or it's library, or what I am trying is not possible, but it should be possible.

I ran iconv as shown below:

$ iconv -f SJIS -t ISO-2022-JP --byte-subst="<0x%x>" /tmp/td.sjis >/tmp/td.txt

iconv: /tmp/td.sjis:12:2: cannot convert

... What happens is that
The conversion proceeds well until a non-convertable character is found.  It then stops the conversion process completely and closes the output file and prints out the above error message, and returns a 1 error code.

However, and rightly when ran simply with the -c option, the whole file is converted and any character which can't be is simply left out of the output stream.

I wonder is this is an ecoding specific bug, i.e., only related to SJIS to ISO-2022-JP or if people have ran into this problem with other encoding sets.

I can supply the input sjis file by appending it to this message, but I'm don't know if that's allowed.

Please consider and advise.


Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list