fix numeric locale

In some locales (e.g. de_DE) floats have commas instead of
dots, but JSON requires dots.
See:
  https://github.com/open-source-parsers/jsoncpp/pull/9
  https://github.com/open-source-parsers/jsoncpp/pull/3
This commit is contained in:
Christopher Dunn
2014-07-10 20:22:47 -07:00
parent 49c732607b
commit 496c655523
2 changed files with 15 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ std::string valueToString(double value) {
#else
snprintf(buffer, sizeof(buffer), "%.16g", value);
#endif
fixNumericLocale(buffer, buffer + strlen(buffer));
return buffer;
}