Fix #12648: Ensure all uses of std::filesystem::path use native encoding. (#12650)

std::filesystem::path does not expect UTF-8 strings, so they must be converted to native format first (and back to utf-8 after.)
This commit is contained in:
Peter Nelson
2024-06-09 10:23:47 +01:00
committed by GitHub
parent fce9361bf2
commit b4b2fad8e0
6 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -258,7 +258,7 @@ void SurveyConfiguration(nlohmann::json &survey)
{
survey["network"] = _networking ? (_network_server ? "server" : "client") : "no";
if (_current_language != nullptr) {
survey["language"]["filename"] = _current_language->file.filename().string();
survey["language"]["filename"] = FS2OTTD(_current_language->file.filename());
survey["language"]["name"] = _current_language->name;
survey["language"]["isocode"] = _current_language->isocode;
}