![]() |
#1 |
Member
![]() Posts: 12
Karma: 10
Join Date: Dec 2020
Device: Android
|
![]()
Hi,
I have not been able to open a specific epub file (10MB) successfully with Sigil as well as Calibre. Sigil can't show any viewable page while Caibre only show 1% of the pages. When i change the epub extension to zip, the extracted files seem incomplete as well (4.3MB), 99% of the text files are missing. I use an Android epub reader Moon+ Reader Pro to open the file, it works perfectly fine. Sigil error ![]() Calibre Viewer error ![]() Calibre Editor screen (no error reported) ![]() If the epub file is corrupted, Moon+ Reader won't be able to open it. What is wrong here? The epub file is attached as below. Moderator Notice
Copyrighted content removed by moderator Last edited by DiapDealer; 09-07-2021 at 04:07 PM. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,353
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
For Sigil's part: it is the insane xhtml filenames that are the problem. Plus, it appears there may be tons of improperly encoded characters for the UTF-8/16 encoding.
I'm going to give the benefit of the doubt in assuming you haven't posted content that infringes on the rights of any potential copyright holders, here. Just know that your upload will be deleted as soon as it's determined otherwise. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,353
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The fact that Moon Reader will open it has no bearing on whether or not it's a valid, spec-compliant, epub
|
![]() |
![]() |
![]() |
#4 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,467
Karma: 5703586
Join Date: Nov 2009
Device: many
|
The file names are ridiculous and something about them is making Sigil think they are not the same as listed in the opf manifest. I have not figured out why (yet). If you load the epub into Sigil, it will tell you that it is seeing these files as unmanifested. So the path in the opf manifest does not seem to match the path as created when extracting file from the zip archive.
If you unzip the epub, you can actually use AddExisting to import the entire set of files and save it as an epub, and then it will work. So it may be an encoding issue in the content.opf itself as it appears it was edited by some tool that is insane enough to add a BOM (byte order mark) to a utf-8 file! There no big endian vs little endian when it is a stream of just bytes (ie. in a utf-8 file) and no ByteOrder mark is ever needed or ever used anymore. I did notice the Sigil 1.7 metadata at some point in the content.opf so at some point this was edited with Sigil but Sigil will not write out BOM so something has edited it after that. Last edited by KevinH; 09-07-2021 at 09:46 AM. |
![]() |
![]() |
![]() |
#5 |
Imperfect Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 621
Karma: 863576
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
|
I don't have a solution, but some clues for more knowledgeable people around here perhaps: The book is in Traditional Chinese (Google/Chrome tells me), and I suspect that the ridiculous file names probably was too at some point of their existence. Given the problems with spaces, commas etc. in filenames inside epubs, we've discussed ad nauseam here on Mobileread for years, I think the problem might lie here.
The Moon reader seems to be originating from Hong Kong, and thus chinese probably are not at problem for it. Just my 2 cents - as usual. Regards, Kim |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,182
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Do an EPUB to AZW3 to EPUB conversion in calibre that will take care of most issues. Or even just an EPUB to EPUB though that will not fix the invalid filenames.
|
![]() |
![]() |
![]() |
#7 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 515
Karma: 2268308
Join Date: Nov 2015
Device: none
|
The easiest way is to use Macintosh or Linux machine/VM to edit the file and mass rename all 900+ files to some Latin letters.
|
![]() |
![]() |
![]() |
#8 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,467
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Or just load the epub in Sigil then use AddExisting to add the .xhtml files from an unzipped version of the epub. Then you can use Sigil's regex rename and batch renaming to create better filenames while properly handling any internal links.
|
![]() |
![]() |
![]() |
#9 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 515
Karma: 2268308
Join Date: Nov 2015
Device: none
|
That file cannot be extracted in Windows, because it does not allow : and * in the Win32-compatible filenames.
|
![]() |
![]() |
![]() |
#10 | ||
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2021
Device: Abakus
|
Thats a chinese book:
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,353
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If it's a commercial book that's not being given away for free, it needs to be taken down.
The filenames make zero sense in any conversion, or liberation sense. There's no reason for them to be converted to extremely long meaningless strings comprised of nothing but two characters (both of which are illegal on Windows). There's nothing human parseable in "::***::*:*::**::**::**:::***:::****::::****:.xhtm l" in any language so something like f00001.xhtml, f00002.xhtml, etc... would work equally well (in any language) and not break. My advice is to throw it back and buy a better copy. Last edited by DiapDealer; 09-07-2021 at 03:36 PM. |
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,353
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Down it comes, then.
|
![]() |
![]() |
![]() |
#14 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,467
Karma: 5703586
Join Date: Nov 2009
Device: many
|
And I was able to track down the issue for Sigil on macOS and Linux. When reading in a manifest item, it looks at the href for a ":" which should only exist in the url's scheme and if it exists, the href is considered to be external and not actually present in the epub. Using external resources in the manifest is allowed in some case under epub3.
So all and all a very strange beast set up to fail on almost very platform. |
![]() |
![]() |
![]() |
#15 |
Member
![]() Posts: 12
Karma: 10
Join Date: Dec 2020
Device: Android
|
yes get a better copy is the solution. There are 2 formats available, i get the mobi format and convert it to epub, then the file is now editable.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil unable to open a file | Andjety | Sigil | 39 | 03-20-2017 11:08 PM |
Unable to open file | Toreth | Sigil | 25 | 03-16-2015 06:36 PM |
Unable to open database file | wladdy | Library Management | 6 | 08-28-2012 05:04 AM |
Unable to open database file | JulieR | Calibre | 2 | 04-24-2009 04:40 AM |
Unable to open file that is 8MB | timyap | Sony Reader | 12 | 05-09-2008 09:51 AM |