pipacs / ionic

E-book reader for EPUB format books
Other
39 stars 20 forks source link

Assume unicode when encoding unspecified #54

Closed tjwalch closed 12 years ago

tjwalch commented 12 years ago

If UTF-8 isn't specified explicitly with a <?xml version="1.0" encoding="UTF-8"?> tag Ionic assumes it is something else (I guess ISO-8859-1) which makes the text display incorrectly. Unicode is mandatory for the EPUB format so the application should interpret text with unspecified encoding as UTF-8.

Many epub generating tools do not include such tag even if the encoding is utf-8 (i e following the standard) and thus Ionic cannot be used for these books.

pipacs commented 12 years ago

The encoding can be UTF-8 or UTF-16, and it is the authoring tool's responsibility to specify the encoding properly. The EPUB format does not specify a default encoding.

Still, if there are some popular publishers producing these kind of broken books, I'll consider adding a workaround.

pipacs commented 12 years ago

Anyway #53 will fix this.