This is the mail archive of the
cygwin
mailing list for the Cygwin project.
iconv problem
- From: wynfield at gmail dot com
- To: <cygwin at cygwin dot com>
- Cc:
- Date: Sat, 19 May 2012 17:29:11 +1000
- Subject: iconv problem
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.
Regards
--
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