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



commit 663ae2b5de395f465246329fc8c38b77474217c2
Author: Milan Crha <mcrha redhat com>
Date:   Wed May 19 23:38:18 2010 +0200

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

 src/libexchangemapi/exchange-mapi-mail-utils.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libexchangemapi/exchange-mapi-mail-utils.c b/src/libexchangemapi/exchange-mapi-mail-utils.c
index a1b2f3e..3580c62 100644
--- a/src/libexchangemapi/exchange-mapi-mail-utils.c
+++ b/src/libexchangemapi/exchange-mapi-mail-utils.c
@@ -456,7 +456,7 @@ mapi_mime_msg_body (MailItem *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)
@@ -465,7 +465,7 @@ mapi_mime_msg_body (MailItem *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 == 20127)
 				buff = g_strdup_printf ("%s; charset=\"us-ascii\"", type);
 			else if (item->header.cpid >= 28591 && item->header.cpid <= 28599)



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