[Bug locale/34236] Non-representable transliteration still causes iconv to exit with 1 if //TRANSLIT is specified

"cvs-commit at gcc dot gnu.org via Glibc-bugs" <[email protected]> Tue, 23 Jun 2026 04:39:36 +0000
Newsgroups gmane.comp.lib.glibc.bugs
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=34236

--- Comment #6 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The release/2.41/master branch has been updated by Aurelien Jarno
<[email protected]>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=fc7a48bc9e999c0f9a1f9fa1b209eac1d6a93363

commit fc7a48bc9e999c0f9a1f9fa1b209eac1d6a93363
Author: Florian Weimer <[email protected]>
Date:   Tue Jun 9 07:28:02 2026 +0200

    iconv: Suppress intermediate errors with //TRANSLIT (bug 34236)

    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.

    Reviewed-by: Aurelien Jarno <[email protected]>
    (cherry picked from commit e9325bd7d04aacc45cf39505e279b1ca9de22c08)

-- 
You are receiving this mail because:
You are on the CC list for the bug.