mcabber/src/commands.c
changeset 461 1d8f5b3a5f2b
parent 454 d647b92e541f
child 462 d580e87c11ed
--- a/mcabber/src/commands.c	Wed Sep 28 00:00:14 2005 +0200
+++ b/mcabber/src/commands.c	Wed Sep 28 21:56:35 2005 +0200
@@ -902,10 +902,17 @@
 static void do_rawxml(char *arg)
 {
   if (!strncasecmp(arg, "send ", 5))  {
+    gchar *buffer;
     for (arg += 5; *arg && *arg == ' '; arg++)
       ;
+    buffer = g_locale_to_utf8(arg, -1, NULL, NULL, NULL);
+    if (!buffer) {
+      scr_LogPrint(LPRINT_NORMAL, "Conversion error in XML string");
+      return;
+    }
     scr_LogPrint(LPRINT_NORMAL, "Sending XML string");
-    jb_send_raw(arg);
+    jb_send_raw(buffer);
+    g_free(buffer);
   } else {
     scr_LogPrint(LPRINT_NORMAL, "Please read the manual page"
                  " before using /rawxml :-)");