Open vlichevsky opened 3 years ago
Interesting! Seems like something wrong with the book - libxml-parse-xml-region
returns nil. But for some reason libxml-parse-html-region
works fine. It need some research.
I found the string which causes an issue - "
юkжэ
". Not sure what this supposed to mean. Also links in the book are not proper fb2 links, which is strange too. I suppose this is because of software used to produce this fb2. Do you have other books which are not rendered by fb2-reader?Yeah, looks like this file contains a mix of cp-1251 encoding with some other, or even just random garbage. I haven't noticed this before, because the fb2 reader I currently use (FBReader) somehow manages to display it. I am not sure, whether it is worth it to try and render such files. A more clear error message would be nice though. If I find books which are not rendered by fb2-reader and not of trash quality like this one I'll report in this issue.
I also noticed another thing - there is no bodies inside that book (as far as I know they should be in correct fb2 document). So I can get xml tree from the book, but my parser can't parse it correctly because of xml structure. Document metadata mentioned software name used to produce it - LibRusEc kit, maybe it produces special fb2 "flavor". So support for such type of files seems doable, but I need more info / book examples. Help is appreciated!:). For now I'll add message in case reader couldn't parse book.
Update: adding messages is boring, so I fixed rendering for this type of books - commits already pushed so you'll receive update soon.
Another problematic file: https://transfer.sh/CIvCgs/eko_imya-rozy.8ndkkg.460991.fb2.gz
Fails with the same message as in the first post.
Thx, seems like my previous suggestion about how parse-html works was incorrect. Hope I'll fix it soon.
Should be fixed now - also added messages when fb2 parsing failed.
Thanks! Broken files can be displayed now. Although Error during redisplay: ...
is still shown for some files (but they are rendered OK).
Nice! Though I'll leave this issue open until I figure out redisplay error.
Some files cannot be rendered by fb2-reader. I get the following error:
Sample file