2 comments
> A related issue solved along was Windows string representation of paths. std::filesystem::path stores its text in wchar_t encoded as UTF-16 (Windows native). But p.string() narrows it down to the active code page, rather than UTF-8 which is what the formatting library expects. The result was a non-ASCII path could get transcoded to gibberish. The C++26 std::formatter<std::filesystem::path> converts Windows native UTC-16 to UTF-8 using Unicode transcoding and avoiding code pages, therefore solving the problem.<p>...only to then convert it back to UTF-16 for WriteConsoleW(), which std::print() usually calls (unless not running in a console) (<a href="https://github.com/microsoft/STL/blob/488e7953685722d2d6666f764c1f2f61958bba76/stl/src/print.cpp#L246" rel="nofollow">https://github.com/microsoft/STL/blob/488e7953685722d2d6666f...</a>).
Surely std::print() shouldn't print anything?
It's a typo, he describes it as std::println in the text, but the code snippet is just print()
I think it is a typo, and should be std::println()
Why even call it in that case?