tForce gettext to return UTF-8 translations when running with GTK+2. - vaccinew… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 8cfe9ec25df37d1d3cadf54926611e2764623469 | |
parent b34b9be1100222fb44a3f959f5e407e82c137c64 | |
Author: Ben Webb <[email protected]> | |
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(-) | |
--- | |
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 Ret… | |
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; | |