]> git.ipfire.org Git - thirdparty/glibc.git/commit
intl: Handle translation output codesets with suffixes [BZ #26383]
authorArjun Shankar <arjun@redhat.com>
Fri, 25 Sep 2020 12:47:06 +0000 (14:47 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 30 Nov 2020 22:59:53 +0000 (22:59 +0000)
commit670c675da3f7b8b2575781309a6c0753df0bd191
treee04213f158f0055552281d7b8e985f98f035ff87
parent8fb94f88249508cdc9addd01ca6124d3d8b94d69
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.

(cherry picked from commit 7d4ec75e111291851620c6aa2c4460647b7fd50d)
NEWS
iconv/Versions
iconv/gconv_charset.c
iconv/gconv_charset.h
iconv/gconv_int.h
iconv/iconv_open.c
iconv/iconv_prog.c
intl/dcigettext.c
intl/tst-codeset.c