Mercurial > pidgin.yaz
changeset 27852:f473058e3839
yahoo status fix second try.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Wed, 11 Jun 2008 10:23:29 +0000 |
parents | 389b22a4431c |
children | ae2cc2905136 |
files | libpurple/protocols/yahoo/util.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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);