From 9689e0699f2dc4074fcae3009a67afe3c4e260c0 Mon Sep 17 00:00:00 2001 From: hiro Date: Sun, 7 Aug 2005 07:40:39 +0000 Subject: some fixes for Win32. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@474 ee746299-78ed-0310-b773-934348b2243d --- ChangeLog | 4 ++++ ChangeLog.ja | 4 ++++ src/codeconv.c | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 967ba0fc..eabfc8d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-08-07 + + * src/codeconv.c: some fixes for Win32. + 2005-08-07 * src/procmsg.c: procmsg_send_queue(): close queue file before diff --git a/ChangeLog.ja b/ChangeLog.ja index 7a7e8a57..202078b9 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,7 @@ +2005-08-07 + + * src/codeconv.c: Win32 向けのいくつかの修正。 + 2005-08-07 * src/procmsg.c: procmsg_send_queue(): キューファイルを消去する前に diff --git a/src/codeconv.c b/src/codeconv.c index c135b19c..470b5e13 100644 --- a/src/codeconv.c +++ b/src/codeconv.c @@ -1214,7 +1214,11 @@ static const struct { {"ja_JP.ujis" , C_EUC_JP , C_ISO_2022_JP}, {"ja_JP.SJIS" , C_SHIFT_JIS , C_ISO_2022_JP}, {"ja_JP.JIS" , C_ISO_2022_JP , C_ISO_2022_JP}, +#ifdef G_OS_WIN32 + {"ja_JP" , C_SHIFT_JIS , C_ISO_2022_JP}, +#else {"ja_JP" , C_EUC_JP , C_ISO_2022_JP}, +#endif {"ko_KR.EUC-KR" , C_EUC_KR , C_EUC_KR}, {"ko_KR" , C_EUC_KR , C_EUC_KR}, {"zh_CN.GB2312" , C_GB2312 , C_GB2312}, @@ -1594,10 +1598,14 @@ const gchar *conv_get_current_locale(void) static const gchar *cur_locale; if (!cur_locale) { +#ifdef G_OS_WIN32 + cur_locale = g_win32_getlocale(); +#else cur_locale = g_getenv("LC_ALL"); if (!cur_locale) cur_locale = g_getenv("LC_CTYPE"); if (!cur_locale) cur_locale = g_getenv("LANG"); if (!cur_locale) cur_locale = setlocale(LC_CTYPE, NULL); +#endif /* G_OS_WIN32 */ debug_print("current locale: %s\n", cur_locale ? cur_locale : "(none)"); -- cgit v1.2.3