diff --git a/common/FileSystem.cpp b/common/FileSystem.cpp index 34be64a1e8..888b985ff9 100644 --- a/common/FileSystem.cpp +++ b/common/FileSystem.cpp @@ -968,7 +968,7 @@ std::FILE* FileSystem::OpenCFile(const char* filename, const char* mode, Error* { #ifdef _WIN32 const std::wstring wfilename = GetWin32Path(filename); - const std::wstring wmode = GetWin32Path(mode); + const std::wstring wmode = StringUtil::UTF8StringToWideString(mode); if (!wfilename.empty() && !wmode.empty()) { std::FILE* fp; @@ -1060,7 +1060,7 @@ std::FILE* FileSystem::OpenSharedCFile(const char* filename, const char* mode, F { #ifdef _WIN32 const std::wstring wfilename = GetWin32Path(filename); - const std::wstring wmode = GetWin32Path(mode); + const std::wstring wmode = StringUtil::UTF8StringToWideString(mode); if (wfilename.empty() || wmode.empty()) return nullptr;