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

Geert Janssens gjanssens at code.gnucash.org
Thu Feb 23 03:32:12 EST 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/fa980fb1 (commit)
	from  https://github.com/Gnucash/gnucash/commit/8c0032ef (commit)



commit fa980fb1c6bb1f9d8c2dc0b9ef9a04d850e201ca
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Wed Feb 22 15:49:42 2023 +0100

    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.

diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp
index 25675f720..9c4acab00 100644
--- a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp
+++ b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp
@@ -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 */



Summary of changes:
 gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



More information about the gnucash-changes mailing list