X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fraw_convert.cc;fp=src%2Fraw_convert.cc;h=35a57a5293df5986dece3820771cdfe46e77f8e6;hb=d78d3a6c156bc159a6726f89f1bdfc274800a14f;hp=281772e7a86f4aadd7969932e1d6362853837044;hpb=c4d06c36ffc25273d3f35449a415b2b813d47a27;p=libdcp.git diff --git a/src/raw_convert.cc b/src/raw_convert.cc index 281772e7..35a57a52 100644 --- a/src/raw_convert.cc +++ b/src/raw_convert.cc @@ -38,13 +38,15 @@ using std::string; using std::wstring; +/** @param v Numeric value as an ASCII string */ static string make_raw (string v) { struct lconv* lc = localeconv (); - boost::algorithm::replace_all (v, lc->decimal_point, "."); + /* thousands_sep may be . so remove them before changing decimal points */ boost::algorithm::replace_all (v, lc->thousands_sep, ""); + boost::algorithm::replace_all (v, lc->decimal_point, "."); return v; }