gaim/gaim

(19:47:05) Paco-Paco: fixes Yahoo! i18n
gtk1-stable
2002-11-11, Luke Schierer
2d8d5b58b2d9
Parents 8c126b792eac
Children 504b25e09e10
(19:47:05) Paco-Paco: fixes Yahoo! i18n
(19:48:20) Paco-Paco: Converts the local charset to UTF-8 for transmission over YIM
--- a/ChangeLog Fri Nov 08 01:03:45 2002 -0500
+++ b/ChangeLog Mon Nov 11 19:50:21 2002 -0500
@@ -5,6 +5,7 @@
fails to read the ~/.gtkrc or reads it but fails
to create a style from it.
* Jabber conference timestamps are no longer gigantic
+ * Yahoo i18n fix (Thanks Ethan Blanton).
version 0.59.5 (10/14/2002):
* Fixed a Yahoo! segfault (Thanks, Craig Metz)
--- a/src/protocols/yahoo/yahoo.c Fri Nov 08 01:03:45 2002 -0500
+++ b/src/protocols/yahoo/yahoo.c Mon Nov 11 19:50:21 2002 -0500
@@ -560,7 +560,7 @@
static void yahoo_process_message(struct gaim_connection *gc, struct yahoo_packet *pkt)
{
- char *msg = NULL;
+ char *msg = NULL, *utf8;
char *from = NULL;
time_t tm = time(NULL);
GSList *l = pkt->hash;
@@ -592,7 +592,9 @@
msg[j++] = m[i];
}
msg[j] = 0;
- serv_got_im(gc, from, msg, 0, tm, -1);
+ utf8 = utf8_to_str (msg);
+ serv_got_im(gc, from, utf8, 0, tm, -1);
+ g_free (utf8);
} else if (pkt->status == 2) {
do_error_dialog(_("Your message did not get sent."), _("Gaim - Error"));
}
@@ -1181,10 +1183,13 @@
{
struct yahoo_data *yd = gc->proto_data;
struct yahoo_packet *pkt = yahoo_packet_new(YAHOO_SERVICE_MESSAGE, YAHOO_STATUS_OFFLINE, 0);
+ char *utf8 = str_to_utf8 (what);
yahoo_packet_hash(pkt, 1, gc->displayname);
yahoo_packet_hash(pkt, 5, who);
- yahoo_packet_hash(pkt, 14, what);
+ yahoo_packet_hash(pkt, 14, utf8);
+
+ g_free (utf8);
yahoo_send_packet(yd, pkt);