tForce gettext to return UTF-8 translations when running with GTK+2. - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 8cfe9ec25df37d1d3cadf54926611e2764623469
(DIR) parent b34b9be1100222fb44a3f959f5e407e82c137c64
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Wed, 27 Mar 2002 13:45:11 +0000
Force gettext to return UTF-8 translations when running with GTK+2.
Diffstat:
M src/gui_client/gtk_client.c | 6 ++++++
1 file changed, 6 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c
t@@ -2114,6 +2114,12 @@ gboolean GtkLoop(int *argc, char **argv[], gboolean ReturnOnFail)
gtk_init(argc, argv);
#endif
+#ifdef HAVE_GLIB2
+ /* GTK+2 expects all strings to be UTF-8, so we force gettext to return
+ * all translations in this encoding here. */
+ bind_textdomain_codeset(PACKAGE, "UTF-8");
+#endif
+
/* Set up message handlers */
ClientMessageHandlerPt = HandleClientMessage;