From: Bruno Haible Date: Sat, 30 Sep 2023 18:41:37 +0000 (+0200) Subject: intl: Merge from glibc. X-Git-Tag: v0.23~344 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f303cebf8f8398f41e4d49a14625b226be58b85;p=thirdparty%2Fgettext.git intl: Merge from glibc. Apply commit 2020-07-07 Arjun Shankar Rewrite iconv option parsing [BZ #19519] --- diff --git a/gettext-runtime/intl/dcigettext.c b/gettext-runtime/intl/dcigettext.c index 8e7db219f..265ef3ba7 100644 --- a/gettext-runtime/intl/dcigettext.c +++ b/gettext-runtime/intl/dcigettext.c @@ -1188,11 +1188,16 @@ _nl_find_msg (struct loaded_l10nfile *domain_file, outcharset = encoding; # ifdef _LIBC - /* We always want to use transliteration. */ - outcharset = norm_add_slashes (outcharset, "TRANSLIT"); - charset = norm_add_slashes (charset, ""); - int r = __gconv_open (outcharset, charset, &convd->conv, - GCONV_AVOID_NOCONV); + + struct gconv_spec conv_spec + = { .fromcode = norm_add_slashes (charset, ""), + .tocode = norm_add_slashes (outcharset, ""), + /* We always want to use transliteration. */ + .translit = true, + .ignore = false + }; + int r = __gconv_open (&conv_spec, &convd->conv, + GCONV_AVOID_NOCONV); if (__builtin_expect (r != __GCONV_OK, 0)) { /* If the output encoding is the same there is