changeset 27662: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 ccb1f1777df7
children f7c5bb2f6623
files libpurple/protocols/msn/msg.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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);