aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-26 06:42:49 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-26 06:42:49 +0000
commit90752d79a7241e0be1798a0ccfacc3e3fa1db952 (patch)
tree9670720a9f9013ae6e72af0c8678212224746945 /src/main.c
parent35f9818c7618c6ecf127321e486182e1372178c7 (diff)
win32: convert locale string to UTF-8 when setting rc dir.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@686 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index d1320ac0..580652f7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -340,8 +340,20 @@ static void parse_cmd_opt(int argc, char *argv[])
if (p && *p != '\0' && *p != '-') {
/* this must only be done at startup */
- cmd.configdir = TRUE;
+#ifdef G_OS_WIN32
+ gchar *utf8dir;
+
+ utf8dir = g_locale_to_utf8
+ (p, -1, NULL, NULL, NULL);
+ if (utf8dir) {
+ set_rc_dir(utf8dir);
+ g_free(utf8dir);
+ } else
+ set_rc_dir(p);
+#else
set_rc_dir(p);
+#endif
+ cmd.configdir = TRUE;
i++;
}
} else if (!strncmp(argv[i], "--help", 6)) {