On Tue Nov 12 05:52:22 2024 +0000, Daniel Lehman wrote:
i do see a difference between wine and windows with fopen (and variants) in ucrtbase but my current reduced sample...
// cl /std:c++17 /source-charset:utf-8 /EHsc /MD fiopen.cpp #include <filesystem> #include <fstream> int main() { std::setlocale(LC_ALL, "de_DE.utf8"); auto utf = std::filesystem::u8path(u8"utf_äÏöß_.txt"); auto s1 = std::ofstream(utf.string()); return 0; }
...calls only into _Fiopen, which currently calls into _wfsopen _Fiopen behaves like _fsopen while _Fiopen_wchar behaves like _wfsopen on my windows 10. and wine's _wfsopen (and variant) matches my windows so i'd need to fix ucrtbase and also rework _Fiopen to call into _fsopen is that what you meant?
Yes, that's what I was thinking about. Sorry for not being more specific.