Use c-locale with std::istream

This commit is contained in:
Nelsson Huotari 2021-01-23 14:46:16 +02:00 committed by Robert Osfield
parent cfe83cffd1
commit 2415a8d138

View File

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