-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
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
_wfopen support #3234
Comments
Supporting UTF-16 in a portable way is problematic but we could replace https://github.com/fmtlib/fmt/blob/master/src/os.cc#L224 This will allow passing UTF-8 paths. A PR to do this would be welcome. |
Is it possible just transfer a handle to already opened file? |
It is not possible with the current API. |
I'd like to work on this. |
Converting UTF-8 to UTF-16 and invoking |
Maybe sometimes only Not sure if this is a common situation. I'll just start with no extra ctor. |
I think it would be OK to add a static "factory" function with the name that indicates that it is Windows-specific, e.g. |
On Windows it is important to use UTF-16 file paths for opening files (at least until recent versions that allow using UTF-8 locale for WinAPI).
std::fstream has overload for std::wstring
for std::FILE* there is Windows-specific "_wfopen" method as a replacement for standard std::fopen.
Is it possible to provide a way to use fmt::output_file with UTF-16 encoded filepath?
The text was updated successfully, but these errors were encountered: