diff --git a/surround360_render/source/thirdparty/supereasyjson/json.cpp b/surround360_render/source/thirdparty/supereasyjson/json.cpp index 64b778a6..a3b2cdcf 100644 --- a/surround360_render/source/thirdparty/supereasyjson/json.cpp +++ b/surround360_render/source/thirdparty/supereasyjson/json.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #ifndef WIN32 #define _stricmp strcasecmp @@ -801,8 +802,13 @@ static Value DeserializeValue(std::string &str, bool *had_error, else if (has_e || has_dot) { char *end_char; errno = 0; - double d = strtod(temp_val.c_str(), &end_char); - if ((errno != 0) || (*end_char != '\0')) { + //double d = strtod(temp_val.c_str(), &end_char); + double d; + std::istringstream istr(temp_val); + istr.imbue(std::locale("en_US.utf8")); + istr >> d; + + if ((errno != 0) /*|| (*end_char != '\0')*/) { // invalid conversion or out of range *had_error = true; return Value();