Fixed locale issue with file parsing
This commit is contained in:
Родитель
9908822dd9
Коммит
66451d179b
|
@ -681,6 +681,8 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
inFile.imbue(std::locale::classic());
|
||||
|
||||
ProcessFileList(inFile, conversion);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <locale>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
@ -74,6 +75,8 @@ public:
|
|||
if (!InFile)
|
||||
return /* HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) */ static_cast<HRESULT>(0x80070002L);
|
||||
|
||||
InFile.imbue(std::locale::classic());
|
||||
|
||||
#ifdef WIN32
|
||||
wchar_t fname[_MAX_FNAME] = {};
|
||||
_wsplitpath_s(szFileName, nullptr, 0, nullptr, 0, fname, _MAX_FNAME, nullptr, 0);
|
||||
|
@ -417,6 +420,8 @@ public:
|
|||
if (!InFile)
|
||||
return /* HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) */ static_cast<HRESULT>(0x80070002L);
|
||||
|
||||
InFile.imbue(std::locale::classic());
|
||||
|
||||
auto curMaterial = materials.end();
|
||||
|
||||
for (;; )
|
||||
|
|
Загрузка…
Ссылка в новой задаче