pidgin: d69cc80e: Only fall back to ISO-8859-1 for text/pl..

qulogic at pidgin.im qulogic at pidgin.im
Sun Jul 19 04:20:50 EDT 2009


-----------------------------------------------------------------
Revision: d69cc80e002f00d7ef65bc01f620d1c2ffa58f3a
Ancestor: 7cbc752a8f08158849396dab8039719a06b82ea9
Author: qulogic at pidgin.im
Date: 2009-07-17T04:11:00
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d69cc80e002f00d7ef65bc01f620d1c2ffa58f3a

Modified files:
        libpurple/protocols/msn/msg.c

ChangeLog: 

Only fall back to ISO-8859-1 for text/plain messages. This fixes some wrong
double-encoding of custom smiley names.

Fixes #8113.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msg.c	c2f3133f1550516cf28d60ae7786e423090cc109
+++ libpurple/protocols/msn/msg.c	96a7be711c4155ebda943476e801c42f53ccb2c4
@@ -349,7 +349,8 @@ msn_message_parse_payload(MsnMessage *ms
 			msg->body[msg->body_len] = '\0';
 		}
 		
-		if (msg->charset == NULL) {
+		if ((!content_type || !strcmp(content_type, "text/plain"))
+			&& msg->charset == NULL) {
 			char *body = g_convert(msg->body, msg->body_len, "UTF-8",
 			                       "ISO-8859-1", NULL, &msg->body_len, NULL);
 			g_free(msg->body);


More information about the Commits mailing list