Convert STFS filenames from Win-1252 to UTF-8
This commit is contained in:
committed by
Radosław Gliński
parent
60b31af811
commit
6cba5ba7e6
@@ -140,7 +140,9 @@ bool DiscImageDevice::ReadEntry(ParseState* state, const uint8_t* buffer,
|
||||
return false;
|
||||
}
|
||||
|
||||
auto name = std::string(name_buffer, name_length);
|
||||
// Filename is stored as Windows-1252, convert it to UTF-8.
|
||||
auto ansi_name = std::string(name_buffer, name_length);
|
||||
auto name = xe::win1252_to_utf8(ansi_name);
|
||||
|
||||
auto entry = DiscImageEntry::Create(this, parent, name, mmap_.get());
|
||||
entry->attributes_ = attributes | kFileAttributeReadOnly;
|
||||
|
||||
Reference in New Issue
Block a user