Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-20-2013, 11:02 PM   #1
mightymouse2045
Enthusiast
mightymouse2045 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: May 2011
Device: xoom
Question dc:language causing issues opening certain ePUBS on android

Hi there,

I have certain ePUBS that are crashing the ebook app I'm using. From what I can see it is the <dc:language>en</dc:language> line that is causing this. If I delete that line from content.opf then the file marked not working, will work.

What doesn't make sense is that another ePUB works fine with the same dc:language set. So obviously something else in the document is causing a clash with the dc:language tag for some reason, can someone help me find what specifically is causing this between these two files?

Regards,
MM
Attached Files
File Type: epub working.epub (1.23 MB, 161 views)
File Type: epub NOT working.epub (1.27 MB, 166 views)
mightymouse2045 is offline   Reply With Quote
Old 11-21-2013, 12:06 AM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,026
Karma: 71684510
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Maybe could you fill us in on WHAT application you are using to read these with?
PeterT is offline   Reply With Quote
Advert
Old 11-21-2013, 01:35 AM   #3
mightymouse2045
Enthusiast
mightymouse2045 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: May 2011
Device: xoom
It's the native samsung ebook application (latest and final version of the app) on Android.

I just switched to moon+ reader pro and the not working one opens fine in that. I'd just really like to know what was causing it though...

Another thing I did was strip out all html files and css apart from the cover page, and tried opening it and it opened fine (with the dc:language tag present), so it's definitely some clash with the dc language tag and some coding in one of the other pages or the css...

I'll keep digging at it and see if I can narrow that down a bit, but I thought someone might be able to locate an obvious difference between the files that may have been causing this.
mightymouse2045 is offline   Reply With Quote
Old 11-21-2013, 01:40 AM   #4
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
Both files work fine in my reading app.

I would suggest that you treat this as a bug in the reading app that crash. Seems most likely.
Adoby is offline   Reply With Quote
Old 11-21-2013, 01:40 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 42,108
Karma: 19574558
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Look for language declarations in the html (lang or xml:lang attributes) Most likely the app cannot handle having both present.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-21-2013, 05:59 AM   #6
mightymouse2045
Enthusiast
mightymouse2045 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: May 2011
Device: xoom
Talking Worked it out

Ok I've worked out what it is.

Kovid can you see if you can work this one out. In the split_002.html file this line is causing it to crash the reader.

Code:
<p class="calibre12"><span class="calibre11"><span class="bold"><span class="calibre5">Corgi&nbsp;Books&nbsp;are&nbsp;published&nbsp;by&nbsp;Transworld&nbsp;Publishers&nbsp;Ltd.,&nbsp;61-63&nbsp;Uxbridge&nbsp;Road,&nbsp;Ealing,&nbsp;London&nbsp;W5&nbsp;5SA,&nbsp;in&nbsp;Australia&nbsp;by&nbsp;Transworld&nbsp;Publishers&nbsp;(Australia)&nbsp;Pty.&nbsp;Ltd.,&nbsp;15-23&nbsp;Helles&nbsp;Avenue,&nbsp;Moorebank,&nbsp;NSW&nbsp;2170,&nbsp;and&nbsp;in&nbsp;New&nbsp;Zealand&nbsp;by&nbsp;Transworld&nbsp;Publishers&nbsp;(N.Z.)&nbsp;Ltd.,&nbsp;Cnr.&nbsp;Moselle&nbsp;and&nbsp;Waipareira&nbsp;Avenues,&nbsp;Henderson,&nbsp;Auckland.</span></span></span></p>
If I delete from Corgi to the beginning of 5SA it still crashes it.

So the following still crashes it:

Code:
<p class="calibre12"><span class="calibre11"><span class="bold"><span class="calibre5">5SA,&nbsp;in&nbsp;Australia&nbsp;by&nbsp;Transworld&nbsp;Publishers&nbsp;(Australia)&nbsp;Pty.&nbsp;Ltd.,&nbsp;15-23&nbsp;Helles&nbsp;Avenue,&nbsp;Moorebank,&nbsp;NSW&nbsp;2170,&nbsp;and&nbsp;in&nbsp;New&nbsp;Zealand&nbsp;by&nbsp;Transworld&nbsp;Publishers&nbsp;(N.Z.)&nbsp;Ltd.,&nbsp;Cnr.&nbsp;Moselle&nbsp;and&nbsp;Waipareira&nbsp;Avenues,&nbsp;Henderson,&nbsp;Auckland.</span></span></span></p>
If I have from (Australia) to (N.Z) it doesn't crash, and if I have from 5SA to Auckland minus the part from (Australia) to (N.Z) it doesn't crash.

So I'm sort of not understanding what part of the above code is causing it. However of the 3 or 4 ePUBS that are causing the reader to crash all of them have the exact same code in them.

As I said if I remove the <dc:language>en</dc:language> from content.opf it works, but of course when getting epub files from the web interface of Calibre that tag gets reinserted. If I remove the whole line from ...split_002.html and leave the dc:language tages in place it fixes it and won't break when getting them from calibre, which is the obvious solution, but could you perhaps see what from the above code is causing the crash in the first place?

I know it's not calibre causing the crash now, but thought you might be able to help out?
mightymouse2045 is offline   Reply With Quote
Old 11-21-2013, 07:00 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 42,108
Karma: 19574558
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There's nothing in that line that is unusual, except the number of non-breaking spaces. Perhaps Samsung's reader cant handle lines like that. Other than that, I see nothing.
kovidgoyal is offline   Reply With Quote
Old 11-21-2013, 07:14 AM   #8
mightymouse2045
Enthusiast
mightymouse2045 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: May 2011
Device: xoom
I thought so - yeah me too. The weird thing is that the ones that are working also have that in there, but 2 less spans, and pointing to a different css style, and instead of (Australia) it has (Aust.), but everything else is exactly the same.

So... I thought "I'll just copy that over to the other one", and yet it still crashes, although I didn't copy the css over, so unless there is some weird interaction with the css and the non breaking spaces then I haven't the foggiest.

Anyways thanks for looking at it, I've switched again to Mantano reader for Android and it's a much nicer reader than the default Samsung one and doesn't have these issues with crashes, on these so that will suit me fine.
mightymouse2045 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create regional language (Kannada) epubs ? vinayaksanga ePub 4 01-02-2013 03:34 AM
iPhone AllThingsD: Apple Confirms iOS 5 Bugs Causing Battery Issues for Some iPhones kjk Apple Devices 2 11-03-2011 02:37 AM
Some EPUBs not opening - normal? zormal Astak EZReader 17 05-19-2010 09:05 AM
Crashing opening calibre epubs mediax Sigil 3 11-12-2009 05:41 PM
Links opening in the same tab and other issues. BookCat Feedback 25 01-22-2009 04:15 PM


All times are GMT -4. The time now is 10:39 AM.


MobileRead.com is a privately owned, operated and funded community.