From 7d4ec75e111291851620c6aa2c4460647b7fd50d Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Fri, 25 Sep 2020 14:47:06 +0200 Subject: intl: Handle translation output codesets with suffixes [BZ #26383] Commit 91927b7c7643 (Rewrite iconv option parsing [BZ #19519]) did not handle cases where the output codeset for translations (via the `gettext' family of functions) might have a caller specified encoding suffix such as TRANSLIT or IGNORE. This led to a regression where translations did not work when the codeset had a suffix. This commit fixes the above issue by parsing any suffixes passed to __dcigettext and adds two new test-cases to intl/tst-codeset.c to verify correct behaviour. The iconv-internal function __gconv_create_spec and the static iconv-internal function gconv_destroy_spec are now visible internally within glibc and used in intl/dcigettext.c. --- iconv/iconv_open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iconv/iconv_open.c') diff --git a/iconv/iconv_open.c b/iconv/iconv_open.c index dd54bc1..5b30055 100644 --- a/iconv/iconv_open.c +++ b/iconv/iconv_open.c @@ -39,7 +39,7 @@ iconv_open (const char *tocode, const char *fromcode) int res = __gconv_open (&conv_spec, &cd, 0); - gconv_destroy_spec (&conv_spec); + __gconv_destroy_spec (&conv_spec); if (__builtin_expect (res, __GCONV_OK) != __GCONV_OK) { -- cgit v1.1