aboutsummaryrefslogtreecommitdiff
path: root/intl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-12 06:58:20 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-12 06:58:20 +0000
commit57f97cff022aaee33c1f34288d4ac177b889427b (patch)
treeec0154d180215c074ec625664306062841366694 /intl
parentda63009e0f5ac74b33d8860a764d8103c5f60ec6 (diff)
downloadglibc-57f97cff022aaee33c1f34288d4ac177b889427b.tar
glibc-57f97cff022aaee33c1f34288d4ac177b889427b.tar.gz
glibc-57f97cff022aaee33c1f34288d4ac177b889427b.tar.bz2
glibc-57f97cff022aaee33c1f34288d4ac177b889427b.zip
Update.
2002-04-30 Bruno Haible <bruno@clisp.org> * intl/loadmsgcat.c (_nl_init_domain_conv): Don't append //TRANSLIT to the encoding if it already has slashes. Reported by Perry Rapp <prapp@erols.com>.
Diffstat (limited to 'intl')
-rw-r--r--intl/loadmsgcat.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index 7238ad3507..afcbd3c9fb 100644
--- a/intl/loadmsgcat.c
+++ b/intl/loadmsgcat.c
@@ -829,20 +829,23 @@ _nl_init_domain_conv (domain_file, domain, domainbinding)
we want to use transliteration. */
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
|| _LIBICONV_VERSION >= 0x0105
- len = strlen (outcharset);
- if (len < 10 || strcmp (outcharset + len - 9, "/TRANSLIT") != 0)
+ if (strchr (outcharset, '/') == NULL)
{
- char *tmp = (char *) alloca (len + 10 + 1);
+ char *tmp;
+
+ len = strlen (outcharset);
+ tmp = (char *) alloca (len + 10 + 1);
memcpy (tmp, outcharset, len);
memcpy (tmp + len, "//TRANSLIT", 10 + 1);
outcharset = tmp;
+
+ domain->conv = iconv_open (outcharset, charset);
+
+ freea (outcharset);
}
+ else
# endif
- domain->conv = iconv_open (outcharset, charset);
-# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
- || _LIBICONV_VERSION >= 0x0105
- freea (outcharset);
-# endif
+ domain->conv = iconv_open (outcharset, charset);
# endif
# endif