Mercurial > pidgin
changeset 23086:00367d8465cf
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 <rekkanoryo@rekkanoryo.org>
author | Yusuke Odate <yusuke.odate@gmail.com> |
---|---|
date | Thu, 22 May 2008 02:46:47 +0000 |
parents | 8b8603d354be |
children | cf3511f4bc07 |
files | libpurple/protocols/yahoo/util.c |
diffstat | 1 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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