[evolution-patches] Compatibility with Lotus Notes fix



I'm russian user of Evolution, i use it at work together with Exchange connector. A problem appears when i try to read a message produced by Lotus Notes. The problem is that LN produces messages in multipart format and inserts datestamps in MIME boundaries. On russian version of Windows datestamps are also in russian. Evolution converts all 8-bit characters in headers to Unicode while in message body boundaries are left as they are. The result is that i don't see message body at all. This patch introduces a workaround for such bad messages. It tells Evolution not to convert "boundary" lines at all. This fixes my problem.
 This patch is made against version at anoncvs.gnome.org from 22.03.2005.

 Kind regards
diff -ru evolution-data-server-cvs/camel/camel-mime-utils.c evolution-data-server/camel/camel-mime-utils.c
--- evolution-data-server-cvs/camel/camel-mime-utils.c	2005-03-02 23:03:58.000000000 -0500
+++ evolution-data-server/camel/camel-mime-utils.c	2005-03-23 13:17:13.000000000 -0500
@@ -2811,7 +2811,9 @@
 	if (strncmp(value, "=?", 2) == 0
 	    && (node->value = header_decode_text(value, strlen(value), FALSE, NULL))) {
 		g_free(value);
-	} else if (!g_utf8_validate(value, -1, NULL)) {
+	/* Russian Lotus Notes inserts 8-bit characters (russian text) into "boundary" lines,
+	   they must not be translated - Pavel Fedin <sonic_amiga rambler ru> */
+	} else if (strcasecmp(name, "boundary") && (!g_utf8_validate(value, -1, NULL))) {
 		const char * charset = e_iconv_locale_charset();
 
 		if ((node->value = header_convert("UTF-8", charset?charset:"ISO-8859-1", value, strlen(value)))) {
@@ -2852,6 +2854,7 @@
 		}
 
 		if (name && value) {
+			d(printf("Decoded parameter %s = %s\n", name, value));
 			char *index = strchr(name, '*');
 
 			if (index) {
@@ -3119,6 +3122,7 @@
 		}
 
 		t = camel_content_type_new(type, subtype);
+		d(printf("Content-type parameters = %s\n",inptr));
 		t->params = header_decode_param_list(&inptr);
 		g_free(type);
 		g_free(subtype);


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