From: <ma...@us...> - 2006-08-22 05:30:36
|
Revision: 16971 Author: marv_sf Date: 2006-08-21 22:30:30 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16971&view=rev Log Message: ----------- Add an encoding option. Let's you specify something other than iso-8859-1 for the nonUTF-8 pieces of the protocol. Modified Paths: -------------- trunk/libgaim/protocols/yahoo/util.c trunk/libgaim/protocols/yahoo/yahoo.c Modified: trunk/libgaim/protocols/yahoo/util.c =================================================================== --- trunk/libgaim/protocols/yahoo/util.c 2006-08-22 04:46:42 UTC (rev 16970) +++ trunk/libgaim/protocols/yahoo/util.c 2006-08-22 05:30:30 UTC (rev 16971) @@ -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); Modified: trunk/libgaim/protocols/yahoo/yahoo.c =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo.c 2006-08-22 04:46:42 UTC (rev 16970) +++ trunk/libgaim/protocols/yahoo/yahoo.c 2006-08-22 05:30:30 UTC (rev 16971) @@ -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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |