Open gabrielaexile opened 3 years ago
Example file path would be like if Windows user name is Þórunn then you cannot save the PDF in My Documents.
Sigh, I hate Windows... For now I will just document the issue until I can write a proper wrapper function.
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.