Bug 798334 - Importing transactions from CSV with space as thousand separator

In addition to stripping currency symbols also strip
all whitespace from fields that are to be interpreted
as numbers.
This commit is contained in:
Geert Janssens 2023-02-22 15:49:42 +01:00
parent 8c0032efc2
commit fa980fb1c6

View File

@ -139,7 +139,7 @@ GncNumeric parse_monetary (const std::string &str, int currency_format)
if(!boost::regex_search(str, boost::regex("[0-9]")))
throw std::invalid_argument (_("Value doesn't appear to contain a valid number."));
auto expr = boost::make_u32regex("[[:Sc:]]");
auto expr = boost::make_u32regex("[[:Sc:][:blank:]]");
std::string str_no_symbols = boost::u32regex_replace(str, expr, "");
/* Convert based on user chosen currency format */