From a5df4f06f796a4c1f78aa9c8e06f4ca823431072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rat?= Date: Mon, 23 Feb 2026 14:17:12 +0100 Subject: [PATCH] Restore iconv tool verbosity for unrecognized encoding names (RHEL-1018) Resolves: RHEL-1018 --- glibc-RHEL-1018.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 glibc-RHEL-1018.patch diff --git a/glibc-RHEL-1018.patch b/glibc-RHEL-1018.patch new file mode 100644 index 0000000..ffe3c50 --- /dev/null +++ b/glibc-RHEL-1018.patch @@ -0,0 +1,24 @@ +commit fc72b6d7d818ab2868920af956d1542d03342a4d +Author: Andreas Schwab +Date: Tue Aug 1 17:01:37 2023 +0200 + + iconv: restore verbosity with unrecognized encoding names (bug 30694) + + Commit 91927b7c76 ("Rewrite iconv option parsing [BZ #19519]") changed the + iconv program to call __gconv_open directly instead of the iconv_open + wrapper, but the former does not set errno. Update the caller to + interpret the return codes like iconv_open does. + +diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c +index 08ea99d6adf6ea86..f199db6020284ad1 100644 +--- a/iconv/iconv_prog.c ++++ b/iconv/iconv_prog.c +@@ -201,7 +201,7 @@ main (int argc, char *argv[]) + + if (res != __GCONV_OK) + { +- if (errno == EINVAL) ++ if (res == __GCONV_NOCONV || res == __GCONV_NODB) + { + /* Try to be nice with the user and tell her which of the + two encoding names is wrong. This is possible because