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 338296 - Imported latin1 characters being saved in data file, then gnucash fails to load it
Imported latin1 characters being saved in data file, then gnucash fails to lo...
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Import - OFX
git-master
Other All
: Normal major
: ---
Assigned To: David Hampton
Benoit Grégoire
Depends on: 100845
Blocks:
 
 
Reported: 2006-04-13 04:22 UTC by Olivier Crête
Modified: 2018-06-29 21:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Olivier Crête 2006-04-13 04:22:31 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.
Comment 1 Christian Stimming 2006-04-19 08:16:51 UTC
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.
Comment 2 David Hampton 2006-06-14 04:06:08 UTC
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.
Comment 3 John Ralls 2018-06-29 21:01:27 UTC
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.