aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog12
-rw-r--r--camel/camel-charset-map.c15
2 files changed, 20 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 75068513a8..c07f3244cd 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-26 Jeffrey Stedfast <fejj@novell.com>
+
+ * camel-charset-map.c (camel_charset_best_mask): Changed the logic
+ slightly to only match certain charsets if the locale matches
+ (Macedonians don't want to use koi8-r for example).
+
2004-07-27 Not Zed <NotZed@Ximian.com>
** See bug #61841.
@@ -23,9 +29,9 @@
Fixes #61454
* providers/groupwise/camel-groupwise-provider.c
- (camel_provider_module_init): do not set
- transport object for groupwise provider. We want user to
- use SMTP itself instead of "Novell Groupwise"
+ (camel_provider_module_init): do not set transport object for
+ groupwise provider. We want user to use SMTP itself instead of
+ "Novell Groupwise"
2004-07-26 Jeffrey Stedfast <fejj@novell.com>
diff --git a/camel/camel-charset-map.c b/camel/camel-charset-map.c
index 9bd4f4e253..dfa7b2402e 100644
--- a/camel/camel-charset-map.c
+++ b/camel/camel-charset-map.c
@@ -261,12 +261,19 @@ camel_charset_step (CamelCharset *c, const char *in, int len)
static const char *
camel_charset_best_mask(unsigned int mask)
{
+ const char *locale_lang, *lang;
int i;
-
- for (i=0;i<sizeof(camel_charinfo)/sizeof(camel_charinfo[0]);i++) {
- if (camel_charinfo[i].bit & mask)
- return camel_charinfo[i].name;
+
+ locale_lang = e_iconv_locale_language ();
+ for (i = 0; i < G_N_ELEMENTS (camel_charinfo); i++) {
+ if (camel_charinfo[i].bit & mask) {
+ lang = e_iconv_charset_language (camel_charinfo[i].name);
+
+ if (!lang || (locale_lang && !strncmp (locale_lang, lang, 2)))
+ return camel_charinfo[i].name;
+ }
}
+
return "UTF-8";
}