delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.0 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,KHOP_RCVD_UNTRUST,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,SPF_NEUTRAL |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <20120519172911.576@binki> |
Date: | Sat, 19 May 2012 17:29:11 +1000 |
From: | wynfield AT gmail DOT com |
To: | <cygwin AT cygwin DOT com> |
cc: | |
Subject: | iconv problem |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |