Index: library/grt/src/unserializer.cpp =================================================================== --- mysql-workbench-oss-5.1.9/library/grt/src/unserializer.cpp +++ mysql-workbench-oss-5.1.9/library/grt/src/unserializer.cpp @@ -245,11 +245,24 @@ case DoubleType: { std::string tmp= get_content(node); - - if (tmp.find(',') != std::string::npos) - { - // hack in case the model was saved in a locale with , as decimal point - tmp[tmp.find(',')]= '.'; + static char decimal_point= 0; + + // now this is a hack for locales that treat . as a thousand separator instead of + // decimal. 1st find out what is used as decimal point, then hackup the string to parse if + // needed + if (decimal_point == 0) + { + char buf[4]; + sprintf(buf, "%.1f", 0.0); // 0.0 + decimal_point= buf[1]; + } + + if (decimal_point != '.') + { + // serializer always saves using . as decimal + std::string::size_type dot= tmp.find('.'); + if (dot != std::string::npos) + tmp[dot]= decimal_point; } value= DoubleRef(strtod(tmp.c_str(), NULL)); break;