OFXMLParser: Add support for different encodings and other improvements.