aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32-gettext.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32-gettext.c')
-rw-r--r--src/w32-gettext.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/w32-gettext.c b/src/w32-gettext.c
index 817c1ca..5b15a77 100644
--- a/src/w32-gettext.c
+++ b/src/w32-gettext.c
@@ -1947,17 +1947,23 @@ _gpg_w32_gettext_localename (void)
}
-/* With a VALUE of 1 switch the gettext functions into utf8 mode.
- That is the strings are returned without translation to the native
- charset. A VALUE of 0 switches back to translated strings. A VALUE
- of -1 returns the current value. */
+/* With a VALUE of 1 switch the gettext functions into utf8 mode; with
+ * 2 or 3 all new threads will initially be using UTF8. That is the
+ * strings are returned without translation to the native charset. A
+ * VALUE of 0 switches back to translated strings. A VALUE of -1
+ * returns the current value. */
int
_gpg_w32_gettext_use_utf8 (int value)
{
struct tls_space_s *tls = get_tls ();
int last = tls->gt_use_utf8;
if (value != -1)
- tls->gt_use_utf8 = value;
+ {
+ tls->gt_use_utf8 = !!value;
+
+ if ((value & 2))
+ _gpgrt_w32_utf8_for_new_threads ();
+ }
return last;
}