linux-capture: Convert window strings to UTF-8 strings

The UI expects everything to be in UTF-8, so convert all window strings
to UTF-8 whenever getting a window name.
master
jp9000 2016-06-05 13:50:53 -07:00
parent 6eea842d9a
commit 57d580f8a9
1 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,7 @@
#include <pthread.h>
#include <obs-module.h>
#include <util/platform.h>
#include "xcompcap-helper.hpp"
@ -199,6 +200,11 @@ namespace XCompcap
}
}
char *conv = nullptr;
if (os_mbs_to_utf8_ptr(res.c_str(), 0, &conv))
res = conv;
bfree(conv);
XFree(tp.value);
return res;