[Kmymoney-devel] OFX and UTF-8 problem

Martin Javorek martin at javorkovi.cz
Wed Jan 18 11:48:51 UTC 2012

thanks a lot for investigation. 

> As a side-note the file you've provided needs an extra OFX header to be 
> interpreted with the correct encoding by libofx (used by the plugin to import 
> OFX files) as in the attached version. Without that header the import won't 
> work correctly anyway.
> To test that you have a correct OFX file you can use the ofxdump application.
> For the attached file it yields (I add only the memo line):
>   Extra transaction information (memo): Životní pojištění - Investor
> While for your original file the output is:
>     Extra transaction information (memo): Ăivotní pojištění - Investor
> Thanks for spotting this bug :).

It is a little bit strange. I'm generating OFX statement using my own OFX generator in Java. It converts proprietary TXT format from my bank to OFX using OFX4J library. Library supports OFX version 1 or 2. 1 is text format with opened XML tags, 2 is valid XML format. I'm using version 2 as it looks better :-) But, those text headers this library generates only for version 1. 

I was playing a little bit with MT2OFX program and converting my statement from and to different formats. And the same result - version 1 has text headers as you sent me, version 2 has only XML headers:

  <?xml version="1.0" encoding="utf-8" ?> 

If I'm thinking in terms of XSD validations of OFX version 2 (http://www.ofx.net/DownloadPage/Downloads.aspx), I cannot imagine, how to validate XML with those strange text headers against some schema. 

As the OFX4J is open source, I can force it to generate text headers into my OFX files, but - is it really OK?


More information about the KMyMoney-devel mailing list