P3904R1 — When paths go WTF: making formatting lossless
Victor Zverovich
SG16
[P2845], adopted in C++26, added formatting support for `std::filesystem::path`, addressing encoding issues and making formatting lossless except for one case, unpaired surrogates on Windows. This paper proposes addressing this case and making formatting 100% lossless by default via the WTF-8 encoding ([WTF-8]). This will improve consistency in path handling between Windows and POSIX platforms and align with the design of `std::format` where the default formatting is normally lossless.