jseutter / ofxparse

Ofx file format parser for Python
http://sites.google.com/site/ofxparse/
MIT License
204 stars 121 forks source link

Bug with encoding for ETrade #171

Open emin63 opened 1 year ago

emin63 commented 1 year ago

Thanks again for this great software.

ETrade gives me an OFX file which has a line like

ENCODING:USASCII
CHARSET:NONE

which triggers a bug in ofxparse.py at https://github.com/jseutter/ofxparse/blob/master/ofxparse/ofxparse.py#L128.

I suggest adding something like

    elif cp == 'NONE':
        encoding = 'cp1252'

before the else clause in that area.

Let me know if you would prefer I make a pull request for this.