GNOME Bugzilla – Bug 338296
Imported latin1 characters being saved in data file, then gnucash fails to load it
Last modified: 2018-06-29 21:01:27 UTC
Please describe the problem: My bank issues OFX files with the data in latin1, when I try to load them in gnucash, it fails to load the accents into the UI, BUT it saves them as-is in its .xac file.. then when I try to reload gnucash, it fails to load its xac file. Steps to reproduce: 1. Get OFX file with ISO-8859-1 data 2. import it into gnucash 3. save 4. close 5. reopen and try to load the xac file Actual results: It can not load the content, and show either no account or not all of the accounts. and the cpu spins a lot before that happens. Expected results: load ok... Does this happen every time? Other information: I guess the OFX importer should go through iconv to convert it to utf-8. Today's svn doesnt build on amd64, so this is a build from 2006-04-01.
Related: bug#100845 Gnucash can't do anything about this until libofx will support different character encodings, including utf-8 and latin-1 and (most importantly) the distinction between those. As a workaround, you should probably recode your ofx file into utf-8 before importing it: recode latin1..utf8 ofxfile.ofx As an additional workaround if you cannot open the data file anymore, you can use gnucash >= 1.9.5 and mark your data file as 1.8.x by removing the attribute encoding="utf-8" from the second line of the file with a text editor. (Might need to gunzip the data file if it is compressed.) Then, the 1.8.x-Importing Wizard should pop up and give you the choice to convert the encodings correctly.
I added code in r14361 (version 1.9.8) to automatically strip any non-utf8 character which will prevent the crash. I filed bug 344841 requesting automatic conversion of imported files to utf8.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=338296. Please update any external references or bookmarks.