[Commits] [SCM] claws branch, master, updated. 3.10.1-151-gbbf4c48

claws at claws-mail.org claws at claws-mail.org
Wed Sep 3 09:12:36 CEST 2014


The branch, master has been updated
       via  bbf4c48e9e1357e752f4edc4841d8eeced6931ee (commit)
      from  6ab4f38a4f6e8c541fd6df93d7221bfc14fe7d7f (commit)

Summary of changes:
 src/codeconv.c |   23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)


- Log -----------------------------------------------------------------
commit bbf4c48e9e1357e752f4edc4841d8eeced6931ee
Author: Paul <paul at claws-mail.org>
Date:   Wed Sep 3 08:12:20 2014 +0100

    fix msg display when utf8_instead_of_locale_for_broken_mail is turned off and you use a UTF-8 locale

diff --git a/src/codeconv.c b/src/codeconv.c
index 08eda0f..c9c8500 100644
--- a/src/codeconv.c
+++ b/src/codeconv.c
@@ -1305,8 +1305,8 @@ static CharSet conv_get_locale_charset(void)
 		return cur_charset;
 	}
 
-	if (strcasestr(cur_locale, ".UTF-8") ||
-	    strcasestr(cur_locale, ".utf8")) {
+	if (strcasestr(cur_locale, "UTF-8") ||
+	    strcasestr(cur_locale, "utf8")) {
 		cur_charset = C_UTF_8;
 		return cur_charset;
 	}
@@ -1344,14 +1344,12 @@ static CharSet conv_get_locale_charset_no_utf8(void)
 	static CharSet cur_charset = -1;
 	const gchar *cur_locale;
 	const gchar *p;
-	gchar *tmp;
 	gint i;
 
-	if (prefs_common.broken_are_utf8)
-		return conv_get_locale_charset();
-
-	if (cur_charset != -1)
+	if (prefs_common.broken_are_utf8) {
+		cur_charset = C_UTF_8;
 		return cur_charset;
+	}
 
 	cur_locale = conv_get_current_locale();
 	if (!cur_locale) {
@@ -1359,10 +1357,10 @@ static CharSet conv_get_locale_charset_no_utf8(void)
 		return cur_charset;
 	}
 
-	if (strcasestr(cur_locale, "UTF-8")) {
-		tmp = g_strdup(cur_locale);
-		*(strcasestr(tmp, ".UTF-8")) = '\0';
-		cur_locale = tmp;
+	if (strcasestr(cur_locale, "UTF-8") ||
+	    strcasestr(cur_locale, "utf8")) {
+		cur_charset = C_UTF_8;
+		return cur_charset;
 	}
 
 	if ((p = strcasestr(cur_locale, "@euro")) && p[5] == '\0') {
@@ -1429,7 +1427,8 @@ static CharSet conv_get_outgoing_charset(void)
 		return out_charset;
 	}
 
-	if (strcasestr(cur_locale, "UTF-8")) {
+	if (strcasestr(cur_locale, "UTF-8") ||
+	    strcasestr(cur_locale, "utf8")) {
 		out_charset = C_UTF_8;
 		return out_charset;
 	}

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list