summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/raw_convert.cc4
1 files changed, 3 insertions, 1 deletions
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;
}