Mercurial > pidgin
diff libpurple/protocols/yahoo/util.c @ 23031:bf7ce9629402
applied changes from a5e7a62db1d43009f4ff463b7fe67ff3a7275a78
through 2e34cc5b5c98162e2a36c51a9eff26fcaa55dcf2
applied changes from 2e34cc5b5c98162e2a36c51a9eff26fcaa55dcf2
through f27cf27abac3307baeb823ac405c3c09bf5f057e
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Thu, 19 Jun 2008 03:14:03 +0000 |
parents | a886e43210b1 |
children | 18a1f0fe5f40 |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/util.c Thu Jun 19 03:13:30 2008 +0000 +++ b/libpurple/protocols/yahoo/util.c Thu Jun 19 03:14:03 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