asio
asio copied to clipboard
win_iocp_file_service: ANSI `CreateFileA` is being used instead of `CreateFileW`
As seen in asio/detail/impl/win_iocp_file_service.cpp:99:
HANDLE handle = ::CreateFileA(path, access, share, 0, disposition, flags, 0);
The ::open method accepts just a plain const char* path without any support for non-ANSI encoding, which prevents opening files with regional, non-ansi-encoded filenames.
Do you think it could be assumed that the path is always coded in UTF-8, and converted via built-in win32 MultiByteToWideChar WideCharToMultiByte functions before opening it? If so, I can do a PR for it @chriskohlhoff .