[PATCH] iconv: Suppress intermediate errors with //TRANSLIT (bug 34236)
Aurelien Jarno
aurel32@debian.org
Tue Jun 9 04:31:28 GMT 2026
Hi,
On 2026-06-08 11:48, Florian Weimer wrote:
> When tentatively converting characters on behalf of
> __gconv_transliterate, do not create a persistent error. Just
> produce a local error, and rely on __gconv_transliterate to
> produce the error if all transliteration options are exhausted.
>
> This fixes transliteration of “½” to ASCII, which cannot use the
> “ 1⁄2 ” alternative. Eventually, the “ 1/2 ” alternative is chosen,
> but the error sticks. Therefore, iconv exited with status 1 before
> this change.
>
> Adjust iconv/tst-iconv_prog.sh to test both C and en_US.UTF-8 locales.
> This requires changing the way the ICONV template is defined, so that
> run_program_env is evaluated multiple times.
>
> Fixes commit 9a4b0eaf726f5404c6683d5c7c5e86f61c3f3fbc ("iconv: do not
> report error exit with transliteration [BZ #32448]"),
> commit 6cbf845fcdc76131d0e674cee454fe738b69c69d ("iconv: Preserve
> iconv -c error exit on invalid inputs (bug 32046)"), and bug 34236.
>
> ---
> iconv/Makefile | 3 ++-
> iconv/loop.c | 6 ++++--
> iconv/tst-iconv_prog.sh | 30 ++++++++++++++++++++----------
> 3 files changed, 26 insertions(+), 13 deletions(-)
>
Thanks, and sorry for missing that in the first fix.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Regards
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
More information about the Libc-alpha
mailing list