diff --git a/source/MaterialXCore/Value.cpp b/source/MaterialXCore/Value.cpp index 6b183f1220..ebf1346f8d 100644 --- a/source/MaterialXCore/Value.cpp +++ b/source/MaterialXCore/Value.cpp @@ -31,8 +31,6 @@ template using enable_if_std_vector_t = template void stringToData(const string& str, T& data) { std::stringstream ss(str); - - // Ignore regional settings while streaming data ss.imbue(std::locale::classic()); if (!(ss >> data)) { @@ -97,9 +95,9 @@ template void stringToData(const string& str, enable_if_std_vector_t void dataToString(const T& data, string& str) { std::stringstream ss; + ss.imbue(std::locale::classic()); // Set float format and precision for the stream - ss.imbue(std::locale::classic()); const Value::FloatFormat fmt = Value::getFloatFormat(); ss.setf(std::ios_base::fmtflags( (fmt == Value::FloatFormatFixed ? std::ios_base::fixed :