# HG changeset patch # User Tim Ringenbach # Date 1156224630 0 # Node ID baf9f997746c9bf5b0ce79443bfa2bbaa71a9338 # Parent d559d6dcb970f7aa2309455f49bd30d518e527aa [gaim-migrate @ 16971] Add an encoding option. Let's you specify something other than iso-8859-1 for the nonUTF-8 pieces of the protocol. committer: Tailor Script diff -r d559d6dcb970 -r baf9f997746c libgaim/protocols/yahoo/util.c --- a/libgaim/protocols/yahoo/util.c Tue Aug 22 04:46:42 2006 +0000 +++ b/libgaim/protocols/yahoo/util.c Tue Aug 22 05:30:30 2006 +0000 @@ -59,7 +59,7 @@ if (yd->jp) to_codeset = "SHIFT_JIS"; else - to_codeset = "ISO-8859-1"; + to_codeset = gaim_account_get_string(gaim_connection_get_account(gc), "local_charset", "ISO-8859-1"); ret = g_convert_with_fallback(str, strlen(str), to_codeset, "UTF-8", "?", NULL, NULL, NULL); if (ret) @@ -80,7 +80,7 @@ { struct yahoo_data *yd = gc->proto_data; char *ret; - char *from_codeset; + const char *from_codeset; if (utf8) { if (g_utf8_validate(str, -1, NULL)) @@ -90,7 +90,7 @@ if (yd->jp) from_codeset = "SHIFT_JIS"; else - from_codeset = "ISO-8859-1"; + from_codeset = gaim_account_get_string(gaim_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); diff -r d559d6dcb970 -r baf9f997746c libgaim/protocols/yahoo/yahoo.c --- a/libgaim/protocols/yahoo/yahoo.c Tue Aug 22 04:46:42 2006 +0000 +++ b/libgaim/protocols/yahoo/yahoo.c Tue Aug 22 05:30:30 2006 +0000 @@ -3884,6 +3884,10 @@ option = gaim_account_option_bool_new(_("Ignore conference and chatroom invitations"), "ignore_invites", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + option = gaim_account_option_string_new(_("Encoding"), "local_charset", "ISO-8859-1"); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + + #if 0 option = gaim_account_option_string_new(_("Chat room list URL"), "room_list", YAHOO_ROOMLIST_URL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);