changeset 25540:d892a9275d0d

make use of utf8 filename in jabber.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Tue, 14 Aug 2007 06:58:29 +0000
parents 536ee8e459ef
children 411b5a604a17
files libpurple/protocols/jabber/si.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/si.c	Tue Aug 07 04:11:02 2007 +0000
+++ b/libpurple/protocols/jabber/si.c	Tue Aug 14 06:58:29 2007 +0000
@@ -38,6 +38,8 @@
 
 #include "si.h"
 
+#include "util.h"
+
 struct bytestreams_streamhost {
 	char *jid;
 	char *host;
@@ -668,7 +670,16 @@
 	xmlnode *si, *file, *feature, *x, *field, *option, *value;
 	char buf[32];
 
-	xfer->filename = g_path_get_basename(xfer->local_filename);
+//	xfer->filename = g_path_get_basename(xfer->local_filename);
+	{ /* yaz */
+		guchar *tmp;
+		size_t dummy;
+		tmp = botch_utf(xfer->filename, strlen(xfer->filename), &dummy);
+		if(tmp){
+			purple_xfer_set_filename(xfer, (char *)tmp);
+			g_free(tmp);
+		}
+	}
 
 	iq = jabber_iq_new(jsx->js, JABBER_IQ_SET);
 	xmlnode_set_attrib(iq->node, "to", xfer->who);