From e055b4a0fdb344ec82eb13a6c8b059621e1b8f85 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 10 Oct 2001 21:36:22 +0000 Subject: Added a hack for Solaris systems. 2001-10-10 Jeffrey Stedfast * camel-charset-map.c (camel_charset_map_init): Added a hack for Solaris systems. svn path=/trunk/; revision=13569 --- camel/ChangeLog | 5 +++++ camel/camel-charset-map.c | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 7c865fe1ad..f994e8430f 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2001-10-10 Jeffrey Stedfast + + * camel-charset-map.c (camel_charset_map_init): Added a hack for + Solaris systems. + 2001-10-10 * providers/local/camel-maildir-store.c (scan_dir): oops, we want diff --git a/camel/camel-charset-map.c b/camel/camel-charset-map.c index 39904b71e3..fd530165ed 100644 --- a/camel/camel-charset-map.c +++ b/camel/camel-charset-map.c @@ -262,7 +262,7 @@ struct { charsets, but we have code that will parse and convert them to their cp#### equivalents if/when they show up in camel_charset_map_to_iconv() so I'm not going to bother - putting them all in here... */ + putting them all in here either... */ { "ks_c_5601-1987", "euc-kr" }, { NULL, NULL } }; @@ -326,9 +326,9 @@ camel_charset_map_init (void) g_hash_table_insert (iconv_charsets, g_strdup (known_iconv_charsets[i].charset), g_strdup (known_iconv_charsets[i].iconv_name)); } - + e_dlist_init(&iconv_cache_list); - + locale = setlocale (LC_ALL, NULL); if (!locale || !strcmp (locale, "C") || !strcmp (locale, "POSIX")) { @@ -349,6 +349,9 @@ camel_charset_map_init (void) int len; p = strchr (locale, '@'); + if (p == NULL) + p = strchr (locale, '/'); /* This is a hack for Solaris systems */ + len = p ? (p - locale) : strlen (locale); if ((p = strchr (locale, '.'))) { locale_charset = g_strndup (p + 1, len - (p - locale) + 1); -- cgit v1.2.3