diff --git a/Source/Core/Core/GeckoCodeConfig.cpp b/Source/Core/Core/GeckoCodeConfig.cpp index a096e722d2..7bf0e59c1f 100644 --- a/Source/Core/Core/GeckoCodeConfig.cpp +++ b/Source/Core/Core/GeckoCodeConfig.cpp @@ -85,6 +85,11 @@ std::vector DownloadCodes(std::string gametdb_id, bool* succeeded) { std::istringstream ssline(line); std::string addr, data; + + // Some locales (e.g. fr_FR.UTF-8) don't split the string stream on space + // Use the C locale to workaround this behavior + ssline.imbue(std::locale::classic()); + ssline >> addr >> data; ssline.seekg(0); @@ -139,6 +144,10 @@ std::vector LoadCodes(const IniFile& globalIni, const IniFile& localI { std::istringstream ss(line); + // Some locales (e.g. fr_FR.UTF-8) don't split the string stream on space + // Use the C locale to workaround this behavior + ss.imbue(std::locale::classic()); + switch ((line)[0]) { // enabled or disabled code