Imported Upstream version 2.61.2
[platform/upstream/glib.git] / gio / gio-tool.c
index 847a218..c0aec74 100644 (file)
@@ -28,7 +28,7 @@
 #include <errno.h>
 
 #include "gio-tool.h"
-
+#include "glib/glib-private.h"
 
 void
 print_error (const gchar *format, ...)
@@ -253,9 +253,20 @@ main (int argc, char **argv)
   const char *command;
   gboolean do_help;
 
-  setlocale (LC_ALL, "");
+#ifdef G_OS_WIN32
+  gchar *localedir;
+#endif
+
+  setlocale (LC_ALL, GLIB_DEFAULT_LOCALE);
   textdomain (GETTEXT_PACKAGE);
+
+#ifdef G_OS_WIN32
+  localedir = _glib_get_locale_dir ();
+  bindtextdomain (GETTEXT_PACKAGE, localedir);
+  g_free (localedir);
+#else
   bindtextdomain (GETTEXT_PACKAGE, GLIB_LOCALE_DIR);
+#endif
 
 #ifdef HAVE_BIND_TEXTDOMAIN_CODESET
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");