[evolution-mapi/gnome-2-30] Bug #600386 - Do not use charset on messages with UNICODE body fetched



commit 2421f3af6d47a01f976ec3dec8f9d2910181706c
Author: Milan Crha <mcrha redhat com>
Date:   Wed May 19 23:39:40 2010 +0200

    Bug #600386 - Do not use charset on messages with UNICODE body fetched

 src/camel/camel-mapi-folder.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/camel/camel-mapi-folder.c b/src/camel/camel-mapi-folder.c
index 12fce93..41b6fd3 100644
--- a/src/camel/camel-mapi-folder.c
+++ b/src/camel/camel-mapi-folder.c
@@ -1557,7 +1557,7 @@ mapi_mime_msg_body (MapiItem *item, const ExchangeMAPIStream *body)
 	camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_8BIT);
 	
 	if (body && body->value && body->value->len > 0) {
-		const gchar* type = NULL;
+		const gchar *type = NULL;
 		gchar *buff = NULL;
 
 		if (item->is_cal)
@@ -1566,7 +1566,7 @@ mapi_mime_msg_body (MapiItem *item, const ExchangeMAPIStream *body)
 			type = (body->proptag == PR_BODY || body->proptag == PR_BODY_UNICODE) ? 
 				"text/plain" : "text/html";
 
-		if (item->header.cpid) {
+		if (item->header.cpid && (body->proptag & 0xFFFF) != PT_UNICODE) {
 			if (item->header.cpid >= 28591 && item->header.cpid <= 28599)
 				buff = g_strdup_printf ("%s; charset=\"ISO-8859-%d\"", type, item->header.cpid % 10);
 			else if (item->header.cpid == 28603)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]