aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-11-11 06:50:35 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-11-11 06:50:35 +0000
commitad8b8400de836f1ffb7cd9607295e202fd4b9f6c (patch)
treeef122fa7038cb1cf17bec6683c382517e1c9e340 /src/main.c
parent8c5a217a35c01e16172c2ef33f28432323280616 (diff)
win32: disable digit locale variable such as 'LANG=1041'.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@737 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index cb8d885c..e815c91f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -402,6 +402,23 @@ static void app_init(void)
{
#ifdef G_OS_WIN32
gchar *newpath;
+ const gchar *lang_env;
+
+ /* disable locale variable such as "LANG=1041" */
+
+#define DISABLE_DIGIT_LOCALE(envstr) \
+{ \
+ lang_env = g_getenv(envstr); \
+ if (lang_env && g_ascii_isdigit(lang_env[0])) \
+ g_unsetenv(envstr); \
+}
+
+ DISABLE_DIGIT_LOCALE("LC_ALL");
+ DISABLE_DIGIT_LOCALE("LANG");
+ DISABLE_DIGIT_LOCALE("LC_CTYPE");
+ DISABLE_DIGIT_LOCALE("LC_MESSAGES");
+
+#undef DISABLE_DIGIT_LOCALE
#endif
setlocale(LC_ALL, "");