Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening .txt file without any newlines gives "unknown document format" error #4

Closed
Frenzie opened this issue Nov 13, 2014 · 5 comments

Comments

@Frenzie
Copy link
Member

Frenzie commented Nov 13, 2014

For more information see koreader/koreader#1161

@Hzj-jie
Copy link
Contributor

Hzj-jie commented Apr 11, 2016

I would like to revisit this issue, the logic around https://github.com/koreader/crengine/blob/master/crengine/src/lvxml.cpp#L2616, is, sorry, fucking senseless.
And as an ebook reader, the restriction is also too strict. I have spent several hours today to debug a txt book, which unfortunately contains one invalid utf-8 character. The file works well on VI, notepad2, kindle, gedit, even windows notepad. But crengine just returns 'error: unknown format ...'.

A draft plan is to add a LVTextRobustParser, to replace 'error: unknown format ...' message.

@houqp
Copy link
Member

houqp commented Apr 11, 2016

Go ahead :)

Also, you said you are in PST, but you are still awake... Are you jet lagging right now? ;P

@Hzj-jie
Copy link
Contributor

Hzj-jie commented Apr 11, 2016

Ah, not really, I just could not stop debugging the case.

@poire-z
Copy link
Contributor

poire-z commented Dec 6, 2019

Can't reproduce, so probably fixed by #39.

@poire-z poire-z closed this as completed Dec 6, 2019
@Hzj-jie
Copy link
Contributor

Hzj-jie commented Dec 6, 2019

Thank you for cleaning up this bug. Yes, it should be fixed already, currently we are always using utf-8 if the encoding is unknown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants