Closed ShadowJonathan closed 6 years ago
Yeah, looking at this, it appears as though Archive is working with ascii strings as opposed to utf8 encoded strings.
OEBPS/Mentor-and-Protégé.html
as opposed to
OEBPS/Mentor-and-Protégé.html
I'm not sure if this is a problem with archive
itself or the software that originally created the epub.
My understanding of zip files is that they write the file headers as a raw byte array and it is up to the unzip library to properly handle the different encodings (but it has been a while since I've looked at the zip specification)
Just looked at the latest version number, it's >2... and epub uses 1.0.33, version incompatibility issue?
I'll upgrade locally and see if it fixes the issue.
Edit: What version were you seeing this in? The latest version of epub
uses version ^2.0.0
of archive
Edit2: Tried locally with archive 2.0.2 and the error persists.
I'll take a look at fixing archive to handle these filenames.
I pushed archive 2.0.3 that should fix this problem by reading filename strings as utf8.
And making sure that the EpubReader
class always reads as utf8 should fix this.
I have a small feeling it'll cause some other issues (like even weirder characters that only appear in unicode), but it'll work for now, I guess
Thanks @brendan-duncan for the new version! I just pub upgrade
'd and the epub @ShadowJonathan attached opens now.
I'll add a few more tests to the library to put the attached epub through its paces. Thanks!
This is probably an
archive
fault, but best to start mentioning it here, as it also affects this package:Resulting (after a while) into the following throw:
Changing lib/src/ref_entities/epub_content_file_ref.dart:~40 to this:
Reveals that the archive files are named like this:
Here is the epub file in question (zipped, as github doesnt accept .epub files) Complete Turnabout - Nenilein.zip
It was downloaded from http://ficsave.xyz