Add functions to convert wide char to UTF-8
There was already utf8_to_wide_char(), used to correctly execute commands on Windows. Add the reverse converter: utf8_from_wide_char(). We will need it to build the scrcpy-server path based on the executable directory.
This commit is contained in:
@@ -32,6 +32,9 @@ utf8_truncation_index(const char *utf8, size_t max_len);
|
||||
// returns the new allocated string, to be freed by the caller
|
||||
wchar_t *
|
||||
utf8_to_wide_char(const char *utf8);
|
||||
|
||||
char *
|
||||
utf8_from_wide_char(const wchar_t *s);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user