changeset 25893:b33635aced5c

*** Plucked rev ecd9624a (sadrul@pidgin.im): Preserve utf-8 status messages when going idle.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 13 May 2009 16:06:23 +0000
parents b34d5e9b3d9b
children 3c1022fd4893 a81f75025e14
files ChangeLog libpurple/protocols/yahoo/yahoo.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon May 11 00:20:17 2009 +0000
+++ b/ChangeLog	Wed May 13 16:06:23 2009 +0000
@@ -26,6 +26,7 @@
 
 	Yahoo:
 	* Fix a crash when sending very long messages.
+	* Fix a bug where UTF-8 status messages get garbled when going idle.
 
 version 2.5.5 (03/01/2009):
 	libpurple:
--- a/libpurple/protocols/yahoo/yahoo.c	Mon May 11 00:20:17 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Wed May 13 16:06:23 2009 +0000
@@ -3820,8 +3820,10 @@
 			status = purple_presence_get_active_status(purple_account_get_presence(purple_connection_get_account(gc)));
 		tmp = purple_status_get_attr_string(status, "message");
 		if (tmp != NULL) {
-			msg = yahoo_string_encode(gc, tmp, NULL);
+			gboolean utf8 = TRUE;
+			msg = yahoo_string_encode(gc, tmp, &utf8);
 			msg2 = purple_markup_strip_html(msg);
+			yahoo_packet_hash_str(pkt, 97, utf8 ? "1" : 0);
 			yahoo_packet_hash_str(pkt, 19, msg2);
 		} else {
 			/* get_yahoo_status_from_purple_status() returns YAHOO_STATUS_CUSTOM for