Package: recode Version: 3.6-22 Followup-For: Bug #348909 I looked into this bug. The problem starts with the fact that iconv returns EILSEQ (invalid input) when in fact the input is simply untranslatable.
It is possible to diagnose this situation by running another conversion with the output encoding the same as the input (so that it will always succeed on valid input) at the same point. Unfortunately, I can’t work out what to do next: in particular, there’s no C API I can use in general to skip the valid but untranslatable character. (At least, none I can see; ideas welcome!) For now, I’ve implemented a partial workaround: untranslatable text is detected, and one byte is skipped. The typical result is that invalid input is diagnosed on the next step, resulting in the same problem as at present. There are two possible workarounds: 1. Set abort_level to RECODE_UNTRANSLATABLE. 2. Don’t use iconv. I have documented these. -- System Information: Debian Release: stretch/sid APT prefers xenial-updates APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial'), (100, 'xenial-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.13.0-26-generic (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages recode depends on: ii libc6 2.23-0ubuntu10 ii librecode0 3.6-22 recode recommends no packages. recode suggests no packages. -- no debconf information