pidgin: 2e34cc5b: Patch from Yusuke Odate to fix Yahoo! Ja...

yusuke.odate at gmail.com yusuke.odate at gmail.com
Wed May 21 22:45:40 EDT 2008


-----------------------------------------------------------------
Revision: 2e34cc5b5c98162e2a36c51a9eff26fcaa55dcf2
Ancestor: a5e7a62db1d43009f4ff463b7fe67ff3a7275a78
Author: yusuke.odate at gmail.com
Date: 2008-05-22T02:46:47
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/2e34cc5b5c98162e2a36c51a9eff26fcaa55dcf2

Modified files:
        libpurple/protocols/yahoo/util.c

ChangeLog: 

Patch from Yusuke Odate to fix Yahoo! Japan encoding to be UTF-8 to match
the newest official client.  This change seems particulary useful now since
the Japan network is now also running protocol 0x0f.

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/util.c	6a72fcc2054413ee7791e5c5cc62b6b18f4bcce0
+++ libpurple/protocols/yahoo/util.c	2a3725bcc455684e1c1bb42bd4982cc322732f38
@@ -114,18 +114,15 @@ char *yahoo_string_encode(PurpleConnecti
 	char *ret;
 	const char *to_codeset;
 
-	if (yd->jp && utf8 && *utf8)
-		*utf8 = FALSE;
+	if (yd->jp)
+		return g_strdup(str);
 
 	if (utf8 && *utf8) /* FIXME: maybe don't use utf8 if it'll fit in latin1 */
 		return g_strdup(str);
 
-	if (yd->jp)
-		to_codeset = "SHIFT_JIS";
-	else
-		to_codeset = purple_account_get_string(purple_connection_get_account(gc), "local_charset",  "ISO-8859-1");
+	to_codeset = purple_account_get_string(purple_connection_get_account(gc), "local_charset",  "ISO-8859-1");
+	ret = g_convert_with_fallback(str, -1, to_codeset, "UTF-8", "?", NULL, NULL, NULL);
 
-	ret = g_convert_with_fallback(str, -1, to_codeset, "UTF-8", "?", NULL, NULL, NULL);
 	if (ret)
 		return ret;
 	else


More information about the Commits mailing list