# HG changeset patch # User Yoshiki Yazawa # Date 1213179809 0 # Node ID f473058e38392fb87c053482b2722aebca0a7272 # Parent 389b22a4431c9a1b2c69c0afc1dd6cfb6d2b5994 yahoo status fix second try. diff -r 389b22a4431c -r f473058e3839 libpurple/protocols/yahoo/util.c --- a/libpurple/protocols/yahoo/util.c Wed Jun 11 08:39:27 2008 +0000 +++ b/libpurple/protocols/yahoo/util.c Wed Jun 11 10:23:29 2008 +0000 @@ -116,7 +116,7 @@ gsize newlen; const char *to_codeset; - if (yd->jp || (utf8 && *utf8)) { + if (utf8 && *utf8) { return botch_utf((gchar *)str, strlen((gchar *)str), &newlen); } @@ -143,13 +143,16 @@ const char *from_codeset; gsize newlen; - if (yd->jp || utf8) { + if (utf8) { ret = sanitize_utf((gchar *)str, strlen((gchar *)str), &newlen); if (g_utf8_validate(ret, -1, NULL)) return ret; } - from_codeset = purple_account_get_string(purple_connection_get_account(gc), "local_charset", "ISO-8859-1"); + if (yd->jp && !utf8) + from_codeset = "SHIFT_JIS"; + else + from_codeset = purple_account_get_string(purple_connection_get_account(gc), "local_charset", "ISO-8859-1"); ret = g_convert_with_fallback(str, strlen(str), "UTF-8", from_codeset, NULL, NULL, NULL, NULL);