aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-iconv.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 11f2091351..91ca6caff7 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-18 Tor Lillqvist <tml@novell.com>
+
+ * e-iconv.c (e_iconv_init): Use g_get_charset() on Win32 to get
+ locale charset. Free return value from g_win32_getlocale().
+
2005-08-10 Tor Lillqvist <tml@novell.com>
* e-xml-utils.c (e_xml_get_child_by_name_by_lang): Use
diff --git a/e-util/e-iconv.c b/e-util/e-iconv.c
index 6cf3987021..65f19b3b4a 100644
--- a/e-util/e-iconv.c
+++ b/e-util/e-iconv.c
@@ -300,6 +300,11 @@ e_iconv_init(int keep)
locale_charset = NULL;
locale_lang = NULL;
} else {
+#ifdef G_OS_WIN32
+ g_get_charset (&locale_charset);
+ locale_charset = g_strdup (locale_charset);
+ e_strdown (locale_charset);
+#else
#ifdef HAVE_CODESET
locale_charset = g_strdup (nl_langinfo (CODESET));
e_strdown (locale_charset);
@@ -325,12 +330,16 @@ e_iconv_init(int keep)
locale_charset = NULL;
}
#endif
+#endif /* !G_OS_WIN32 */
/* parse the locale lang */
locale_parse_lang (locale);
}
+#ifdef G_OS_WIN32
+ g_free (locale);
+#endif
if (!keep)
UNLOCK();
}