# HG changeset patch # User Yusuke Odate # Date 1211424407 0 # Node ID 00367d8465cf2e18949b4ec5c139dc0bc8cb50cd # Parent 8b8603d354be107e5e84cfff2c1dc743facba5d4 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. committer: John Bailey diff -r 8b8603d354be -r 00367d8465cf libpurple/protocols/yahoo/util.c --- a/libpurple/protocols/yahoo/util.c Wed May 21 22:26:51 2008 +0000 +++ b/libpurple/protocols/yahoo/util.c Thu May 22 02:46:47 2008 +0000 @@ -114,18 +114,15 @@ 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