[evolution-mapi] Bug #598564 - Has problems encoding mails containing html



commit be2cd6dc8dfe1ced0f5f43a352201bdddc155e78
Author: Milan Crha <mcrha redhat com>
Date:   Thu Apr 1 14:48:41 2010 +0200

    Bug #598564 - Has problems encoding mails containing html

 src/camel/camel-mapi-folder.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/camel/camel-mapi-folder.c b/src/camel/camel-mapi-folder.c
index 15b73d1..ab6f1e9 100644
--- a/src/camel/camel-mapi-folder.c
+++ b/src/camel/camel-mapi-folder.c
@@ -1590,7 +1590,15 @@ mapi_mime_msg_body (MapiItem *item, const ExchangeMAPIStream *body)
 				"text/plain" : "text/html";
 
 		if (item->header.cpid) {
-			if (item->header.cpid == 65001)
+			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)
+				buff = g_strdup_printf ("%s; charset=\"ISO-8859-13\"", type);
+			else if (item->header.cpid == 28605)
+				buff = g_strdup_printf ("%s; charset=\"ISO-8859-15\"", type);
+			else if (item->header.cpid == 65000)
+				buff = g_strdup_printf ("%s; charset=\"UTF-7\"", type);
+			else if (item->header.cpid == 65001)
 				buff = g_strdup_printf ("%s; charset=\"UTF-8\"", type);
 			else
 				buff = g_strdup_printf ("%s; charset=\"CP%d\"", type, item->header.cpid);



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