Create process with wide chars on Windows
Windows does not support UTF-8, so pushing a file with non-ASCII characters failed. Convert the UTF-8 command line to a wide characters string and call CreateProcessW(). Fixes <https://github.com/Genymobile/scrcpy/issues/422>
This commit is contained in:
@@ -20,4 +20,10 @@ size_t xstrjoin(char *dst, const char *const tokens[], char sep, size_t n);
|
||||
// returns the new allocated string, to be freed by the caller
|
||||
char *strquote(const char *src);
|
||||
|
||||
#ifdef _WIN32
|
||||
// convert a UTF-8 string to a wchar_t string
|
||||
// returns the new allocated string, to be freed by the caller
|
||||
wchar_t *utf8_to_wide_char(const char *utf8);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user