Merge pull request #1039 from unelsson/clocaletodae

Use c-locale with std::istream
This commit is contained in:
Robert Osfield 2021-01-23 15:57:16 +00:00 committed by GitHub
commit b5b0bed7c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -292,6 +292,8 @@ bool daeReader::convert( std::istream& fin )
// set fileURI to null device
const std::string fileURI("from std::istream");
fin.imbue(std::locale::classic());
// get the size of the file and rewind
fin.seekg(0, std::ios::end);
unsigned long length = static_cast<unsigned long>(fin.tellg());