Convert STFS filenames from Win-1252 to UTF-8

This commit is contained in:
NicknineTheEagle
2024-09-22 20:24:37 +03:00
committed by Radosław Gliński
parent 60b31af811
commit 6cba5ba7e6
5 changed files with 89 additions and 4 deletions

View File

@@ -153,7 +153,9 @@ SvodContainerDevice::Result SvodContainerDevice::ReadEntry(
return Result::kReadError;
}
auto name = std::string(name_buffer.get(), dir_entry.name_length);
// Filename is stored as Windows-1252, convert it to UTF-8.
auto ansi_name = std::string(name_buffer.get(), dir_entry.name_length);
auto name = xe::win1252_to_utf8(ansi_name);
// Read the left node
if (dir_entry.node_l) {