File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,13 @@ std::wstring utf8_to_wide(const std::string &input)
83
83
return out;
84
84
}
85
85
86
+ #ifdef __ANDROID__
87
+ // TODO: this is an ugly fix for wide_to_utf8 somehow not working on android
88
+ std::string wide_to_utf8 (const std::wstring &input)
89
+ {
90
+ return wide_to_narrow (input);
91
+ }
92
+ #else
86
93
std::string wide_to_utf8 (const std::wstring &input)
87
94
{
88
95
size_t inbuf_size = (input.length () + 1 ) * sizeof (wchar_t );
@@ -102,6 +109,7 @@ std::string wide_to_utf8(const std::wstring &input)
102
109
103
110
return out;
104
111
}
112
+ #endif
105
113
#else
106
114
std::wstring utf8_to_wide (const std::string &input)
107
115
{
@@ -126,7 +134,6 @@ std::string wide_to_utf8(const std::wstring &input)
126
134
}
127
135
#endif
128
136
129
-
130
137
// You must free the returned string!
131
138
// The returned string is allocated using new
132
139
wchar_t *narrow_to_wide_c (const char *str)
You can’t perform that action at this time.
0 commit comments