1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-21 17:17:06 +02:00

Merge pull request #4859 from IvanSavenko/map_encoding_fix

Fix selection of encoding from maps
This commit is contained in:
Ivan Savenko 2024-11-06 22:00:59 +02:00 committed by GitHub
commit a2c2b28dfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -443,7 +443,7 @@ std::string CModHandler::findResourceEncoding(const ResourcePath & resource) con
// however at the moment we have no way to detect that for sure - file can be either in English or in user-preferred language
// but since all known H3 encodings (Win125X or GBK) are supersets of ASCII, we can safely load English data using encoding of user-preferred language
std::string preferredLanguage = VLC->generaltexth->getPreferredLanguage();
std::string fileEncoding = Languages::getLanguageOptions(modLanguage).encoding;
std::string fileEncoding = Languages::getLanguageOptions(preferredLanguage).encoding;
return fileEncoding;
}
else