[gaim-migrate @ 11520]

Sat, 04 Dec 2004 21:41:25 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Sat, 04 Dec 2004 21:41:25 +0000
changeset 10318
e445c737bdeb
parent 10317
639e0b795f5d
child 10319
e45260cc6aa6

[gaim-migrate @ 11520]
Hopefully decode non-ascii direct IM messages.

COPYRIGHT file | annotate | diff | comparison | revisions
src/protocols/oscar/oscar.c file | annotate | diff | comparison | revisions
--- a/COPYRIGHT	Sat Dec 04 21:30:03 2004 +0000
+++ b/COPYRIGHT	Sat Dec 04 21:41:25 2004 +0000
@@ -147,6 +147,7 @@
 Alceste Scalas
 Carsten Schaar
 Luke Schierer
+Ralph Schmieder
 Evan Schoenberg
 Torrey Searle
 Don Seiler
--- a/src/protocols/oscar/oscar.c	Sat Dec 04 21:30:03 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Sat Dec 04 21:41:25 2004 +0000
@@ -1296,10 +1296,15 @@
 		g_string_append_len(newmsg, msg, len);
 	}
 
-	/* XXX - I imagine Paco-Paco will want to do some voodoo with the encoding here */
-	serv_got_im(gc, sn, newmsg->str, imflags, time(NULL));
-
-	/* free up the message */
+	/* Convert to UTF8 */
+	/* (This hasn't been tested very much) */
+	utf8 = gaim_plugin_oscar_decode_im_part(gc->account, sn, encoding, 0x0000, newmsg->str, len);
+	if (utf8 != NULL) {
+		serv_got_im(gc, sn, utf8, imflags, time(NULL));
+		g_free(utf8);
+	}
+
+	/* free the message */
 	g_string_free(newmsg, TRUE);
 
 	/* unref any images we allocated */

mercurial