We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non English letters will fail in File paths for Windows _open cannot carry UTF8 on Windows.
Only solution I know is to use:
#ifdef _WIN32 if ((fd = _wopen((const wchar_t*)filename, O_RDONLY | O_BINARY)) < 0) #else if ((fd = open(filename, O_RDONLY | O_BINARY)) < 0) #endif
Or alternative if you want to keep your API using UTF8 then take it in as UTF8 and convert to UTF16 before calling _wopen.
The text was updated successfully, but these errors were encountered:
Example file path would be like if Windows user name is Þórunn then you cannot save the PDF in My Documents.
Sorry, something went wrong.
Sigh, I hate Windows... For now I will just document the issue until I can write a proper wrapper function.
michaelrsweet
No branches or pull requests
Non English letters will fail in File paths for Windows _open cannot carry UTF8 on Windows.
Only solution I know is to use:
#ifdef _WIN32
if ((fd = _wopen((const wchar_t*)filename, O_RDONLY | O_BINARY)) < 0)
#else
if ((fd = open(filename, O_RDONLY | O_BINARY)) < 0)
#endif
Or alternative if you want to keep your API using UTF8 then take it in as UTF8 and convert to UTF16 before calling _wopen.
The text was updated successfully, but these errors were encountered: