After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 141003 - QIF: Number format with currency symbol in
QIF: Number format with currency symbol in
Status: RESOLVED OBSOLETE
Product: GnuCash
Classification: Other
Component: Import - QIF
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Charles Day
Derek Atkins
Depends on:
Blocks:
 
 
Reported: 2004-04-24 11:53 UTC by Andrew McDonald
Modified: 2018-06-29 20:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andrew McDonald 2004-04-24 11:53:23 UTC
The qif format produced by one of my on-line credit card accounts puts a
currency symbol (the GBP pound sign '£') in the numbers. GnuCash fails to import
these files. It would be nice if it worked, rather having to modify the qif
files by hand first.

A sample qif file looks like:

!Type:CCard
D21/04/2004
T-£10.50
PTHE SHOPPING CENTRE
ASOMEPLACE
AGBR
A
N
^
Comment 1 Derek Atkins 2004-04-24 14:47:14 UTC
Hmm, I thought this worked, but perhaps it only works with '$' and not '£'.
Comment 2 Bengt Thuree 2006-04-04 07:52:30 UTC
Is this still a problem?
Comment 3 Andrew McDonald 2006-04-09 18:44:35 UTC
Well, it isn't a problem for me anymore, since I no longer have the credit card whose on-line servicing produced these qif files.

However, doing a quick test on 1.9.4 with the sample I gave fails to import (QIF file parse failed: Data for number or date does not match a known format.), so it may still be a problem for some people.
Comment 4 Derek Atkins 2006-04-14 15:29:54 UTC
Yeah, this code hasn't changed at all, so it's no surprise that it's still a problem.  I suppose I could try to make the regex ignore any non-digit characters.
Comment 5 Derek Atkins 2006-07-16 22:43:42 UTC
I just started looking into this and, unfortunately, it's much more challenging that I first anticipated.  Just updating the regex is not sufficient, because while it uses the regex to determine what KIND of number it is, it doesn't use that regex to actually parse the number out.  So while it can ignore '$', that is fairly hardcoded into a number of different places, and making that a variable would be some major surgery.  :(

So, I'm not going to be able to do this right now like I thought I could.
I'll leave it open for later.
Comment 6 Charles Day 2008-09-02 20:21:05 UTC
This has been reported as a problem again (bug 550176). Apparently TSB (UK) bank does this in their credit card statement downloads.

Fix committed as r17489. Requesting backport for 2.2.
Comment 7 Charles Day 2008-09-14 18:27:07 UTC
Better hold off on backporting this patch. Dave Reiser has reported a problem with this patch (see the -devel mailing list).

Mac OS X 10.5.4
gcc 4.0.1, autoconf 2.62 (2.63 readily available), automake 1.9.6
(1.10.1 readily available)
guile 1.8.3
Comment 8 Chris 2008-12-09 14:17:38 UTC
I have this bug in version 2.2.7. When I download from Capital One in the UK the currency symbol is the £ and the import fails. Amending the £ to $ in the downloaded QIF file solves the problem. I used WordPad the perform the change. No problem but it would be a worthwhile change when next updating GnuCash. 
Comment 9 Derek Atkins 2008-12-09 16:02:45 UTC
Chris,

Yes, it would be nice, but unfortunately it doesn't work.  See comment #7.  Until we can actually verify that the change works in all environments it would behoove us not to ship with this patch.   In particular, on OSX it caused a fatal crash at GnuCash start time, even if you dont try to import a QIF File.

Part of the issue is charset encoding.  The £ symbol isn't ASCII, so does the character need to be Latin-1 or UTF8?  Unfortunately Guile isn't clear on what its input should be, so you have a problem that different systems require a different locale for the encoding of the Scheme files.

Now, one approach to fix it would be to encode some of that RegEx code in C, but I don't know how hard that would be.
Comment 10 Charles Day 2008-12-09 18:17:30 UTC
Comment #7: Check the mailing list archives for more discussion on this. Bottom line is that the fix for bug 141002 is has been separated and it waiting for backport, but a fix for bug 141003 is not ready. Actually I had a redesigned fix nearly working, but my PC encountered hardware problems and trunk also refused to compile on Windows (for unrelated reasons), so that code is sitting on a broken PC on the other side of the world. I won't get another chance to look at it for a few months.
Comment 11 Jamie Thompson 2012-01-07 15:47:12 UTC
Has there been any movement on this? I just downloaded 2.4.8 to try managing the archive of old exports I have and all my Capital One QIF files have pound signs in them....this is going to be a right pain :(
Comment 12 Derek Atkins 2012-01-07 15:50:31 UTC
Nope, no movement.
In the interim you can run:
   sed -i -e 's/£//g' file.QIF
which will remove all instances of the pound symbol.
Then import.
Comment 13 John Ralls 2018-06-29 20:43:03 UTC
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=141003. Please continue processing the bug there and please update any external references or bookmarks.