Bug 284843 - OFX import does not work on UTF-8 encoded files
Summary: OFX import does not work on UTF-8 encoded files
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Guillaume DE BURE
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-24 05:36 UTC by Johannes Goller
Modified: 2011-10-24 08:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test file for import (1.54 KB, text/ofx)
2011-10-24 05:37 UTC, Johannes Goller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Goller 2011-10-24 05:36:04 UTC
Version:           unspecified (using KDE 4.6.5) 
OS:                Linux

When attempting to import an OFX file in UTF-8 that contains multibyte character codes, the encoding is not processed correctly. For example, the "payee" information in the attached utf8.ofx, which is Japanese Katakana, gets scrambled (it looks like it was misinterpreted as ISO-8859-1).

Reproducible: Always

Steps to Reproduce:
1) Open Skrooge and create at least one account (the details don't matter)
2) Click File -> Import... and select the utf8.ofx attached to this bug report
3) Confirm that the payee information is scrambled


Actual Results:  
The payee information is represented as an unreadable combination of nonsensical characters

Expected Results:  
The payee information should be Japanese Katakana: カード in the 1st, 2nd, 4th, 5th and 6th entry, and クレジット in the 3rd imported entry.

I also tried selecting "UTF-8" in the import options, although it is automatically pre-selected. That did not change anything.

I then tried converting the file to UTF-16 and selected UTF-16 during the import. That did not work at all (the imported information was not even displayed).
Comment 1 Johannes Goller 2011-10-24 05:37:05 UTC
Created attachment 64823 [details]
Test file for import
Comment 2 Stephane MANKOWSKI 2011-10-24 07:46:24 UTC
Git commit a0021b03b4d7d12e5c61965173fdd0caa1f4bb8a by Stephane Mankowski.
Committed on 24/10/2011 at 09:46.
Pushed by smankowski into branch 'Feature'.

BUG: 284843: OFX import does not work on UTF-8 encoded files

M  +1    -0    CHANGELOG
M  +18   -18   plugins/import/skrooge_import_ofx/skgimportpluginofx.cpp
A  +100  -0    tests/input/skgtestimportofx/284843.ofx
M  +19   -0    tests/skgbankmodelertest/skgtestimportofx.cpp

http://commits.kde.org/skrooge/a0021b03b4d7d12e5c61965173fdd0caa1f4bb8a
Comment 3 Johannes Goller 2011-10-24 08:39:12 UTC
Very impressive turn around. Thank you very much indeed.

I checked out the 'Feature' branch, built it and confirmed that it works now.