While utf8_to_wide works well, wide_to_utf8 is quite broken
on android, for some reason.
return out;
}
+#ifdef __ANDROID__
+// TODO: this is an ugly fix for wide_to_utf8 somehow not working on android
+std::string wide_to_utf8(const std::wstring &input)
+{
+ return wide_to_narrow(input);
+}
+#else
std::string wide_to_utf8(const std::wstring &input)
{
size_t inbuf_size = (input.length() + 1) * sizeof(wchar_t);
return out;
}
+#endif
#else
std::wstring utf8_to_wide(const std::string &input)
{
}
#endif
-
// You must free the returned string!
// The returned string is allocated using new
wchar_t *narrow_to_wide_c(const char *str)