From: Luke S. <lsc...@us...> - 2002-11-12 00:50:25
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv9742/src/protocols/yahoo Modified Files: Tag: gtk1-stable yahoo.c Log Message: (19:47:05) Paco-Paco: fixes Yahoo! i18n (19:48:20) Paco-Paco: Converts the local charset to UTF-8 for transmission over YIM Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.43.2.6 retrieving revision 1.43.2.7 diff -u -d -r1.43.2.6 -r1.43.2.7 --- yahoo.c 11 Oct 2002 05:40:57 -0000 1.43.2.6 +++ yahoo.c 12 Nov 2002 00:50:21 -0000 1.43.2.7 @@ -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); |