summaryrefslogtreecommitdiffstats
path: root/common/i18n.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2010-03-02 22:25:08 +0100
committerWerner Koch <wk@gnupg.org>2010-03-02 22:25:08 +0100
commitd232fd2e543fb81151d7fe25e9f0692610870788 (patch)
tree8ce5ef17c07737c2ae873f945f99fb255f6573a3 /common/i18n.c
parentFinished jnlib port to CE. (diff)
downloadgnupg2-d232fd2e543fb81151d7fe25e9f0692610870788.tar.xz
gnupg2-d232fd2e543fb81151d7fe25e9f0692610870788.zip
First steps towards the W32CE port
Diffstat (limited to 'common/i18n.c')
-rw-r--r--common/i18n.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/common/i18n.c b/common/i18n.c
index db5ddf5f8..7601cf8bd 100644
--- a/common/i18n.c
+++ b/common/i18n.c
@@ -1,5 +1,5 @@
/* i18n.c - gettext initialization
- * Copyright (C) 2007 Free Software Foundation, Inc.
+ * Copyright (C) 2007, 2010 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -51,8 +51,8 @@ char *
i18n_switchto_utf8 (void)
{
#ifdef USE_SIMPLE_GETTEXT
- gettext_select_utf8 (1);
- return NULL;
+ /* Return an arbitrary pointer as true value. */
+ return gettext_use_utf8 (1) ? (char*)(-1) : NULL;
#elif defined(ENABLE_NLS)
char *orig_codeset = bind_textdomain_codeset (PACKAGE_GT, NULL);
# ifdef HAVE_LANGINFO_CODESET
@@ -82,8 +82,7 @@ void
i18n_switchback (char *saved_codeset)
{
#ifdef USE_SIMPLE_GETTEXT
- (void)saved_codeset;
- gettext_select_utf8 (0);
+ gettext_use_utf8 (!!saved_codeset);
#elif defined(ENABLE_NLS)
if (saved_codeset)
{