Portable UTF-8 string conversions for C++17/C++20 compatibility See: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html
| 84 | // Portable UTF-8 string conversions for C++17/C++20 compatibility |
| 85 | // See: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html |
| 86 | std::string pathToUtf8(const std::filesystem::path& path) |
| 87 | { |
| 88 | const auto s = path.generic_u8string(); |
| 89 | return {s.begin(), s.end()}; |
| 90 | } |
| 91 | |
| 92 | std::filesystem::path pathFromUtf8(std::string_view utf8Str) |
| 93 | { |
no test coverage detected