d1vanov/libquentier

Extend ENML converter API to allow for for importing ENEX from file as well as string

Opened this issue · 0 comments

See d1vanov/quentier#179: due to wrong encoding the ENEX file contents were not read correctly. It appears than currently all ENEX files use UTF-8 encoding, however, there's seems to be no official Evernote documentation which would guarantee that would always be the case. If, for example, the file is encoded using UTF-16, the only correct way to process it would be to pass it to QXmlStreamReader inside ENMLConverter in its original form, so the encoding can be detected automatically. For this to be doable the extension of existing ENML conversion API is required: it needs to accept not only ENEX string but also ENEX file i.e. QFile handle for the actual file.