mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 03:16:54 +02:00
Merge PR #716: Fix Unicode paths on Windows
Preserve native Windows paths for filesystem operations, command-line options, and game icons. Complete Unicode handling in recursive file listings and file logging, restore unmounting by host directory, and extend regression coverage. Original implementation by Augusto Domingos (@AghastyGD); retain all five of his PR commits and include the reviewed follow-up fixes. Closes #714 Co-authored-by: Augusto Domingos <augustodomingosvasco@gmail.com>
This commit is contained in:
@@ -34,6 +34,14 @@ inline std::string PathToGenericString(const std::filesystem::path& path) {
|
||||
#endif
|
||||
}
|
||||
|
||||
inline std::filesystem::path PathFromUtf8(std::string_view text) {
|
||||
#if defined(__cpp_char8_t)
|
||||
return std::filesystem::path(std::u8string(text.begin(), text.end()));
|
||||
#else
|
||||
return std::filesystem::u8path(text.begin(), text.end());
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool EqualNoCase(std::string_view lhs, std::string_view rhs) {
|
||||
if (lhs.size() != rhs.size()) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user