diff libpurple/protocols/msn/msg.c @ 27586:0f48945aa77f

Only fall back to ISO-8859-1 for text/plain messages. This fixes some wrong double-encoding of custom smiley names. Fixes #8113.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 17 Jul 2009 04:11:00 +0000
parents 3dcc42d3cc12
children 2f7386e1c5d1 338d6a211055
line wrap: on
line diff
--- a/libpurple/protocols/msn/msg.c	Thu Jul 16 05:17:45 2009 +0000
+++ b/libpurple/protocols/msn/msg.c	Fri Jul 17 04:11:00 2009 +0000
@@ -349,7 +349,8 @@
 			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);