Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115452
D8343.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
422 B
Subscribers
None
D8343.diff
View Options
diff --git a/src/fs.cpp b/src/fs.cpp
--- a/src/fs.cpp
+++ b/src/fs.cpp
@@ -20,7 +20,12 @@
namespace fsbridge {
FILE *fopen(const fs::path &p, const char *mode) {
+#ifndef WIN32
return ::fopen(p.string().c_str(), mode);
+#else
+ std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> utf8_cvt;
+ return ::_wfopen(p.wstring().c_str(), utf8_cvt.from_bytes(mode).c_str());
+#endif
}
#ifndef WIN32
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 11:07 (14 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187506
Default Alt Text
D8343.diff (422 B)
Attached To
D8343: utils: Use _wfopen and _wreopen on Windows
Event Timeline
Log In to Comment