X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=tools%2Fquake3%2Fcommon%2Finout.c;h=6f127e3e5f45cb0c1bfebf7f7de8193e40271b28;hp=dcdd08932ae2aa838d33afb402e37230434e3c1d;hb=88cea027e6e647250b1f19862393306948801fca;hpb=995f6a1011ef2df976200ab59ad3190fdc8e9b50 diff --git a/tools/quake3/common/inout.c b/tools/quake3/common/inout.c index dcdd0893..6f127e3e 100644 --- a/tools/quake3/common/inout.c +++ b/tools/quake3/common/inout.c @@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#ifdef _WIN32 +#ifdef WIN32 #include #include #endif @@ -42,7 +42,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_net/l_net.h" #include "libxml/tree.h" -#ifdef _WIN32 +// utf8 conversion +#include +#include + +#ifdef WIN32 HWND hwndOut = NULL; qboolean lookedForServer = qfalse; UINT wm_BroadcastCommand = -1; @@ -289,7 +293,11 @@ void FPrintf (int flag, char *buf) bGotXML = qtrue; } node = xmlNewNode (NULL, "message"); - xmlNodeSetContent (node, buf); + { + gchar* utf8 = g_locale_to_utf8(buf, -1, NULL, NULL, NULL); + xmlNodeSetContent(node, utf8); + g_free(utf8); + } level[0] = (int)'0' + flag; level[1] = 0; xmlSetProp (node, "level", (char *)&level );