View Single Post
Old 01-28-2018, 01:31 AM   #8
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by minsik View Post
thanks prompt davidfor as that sample works fine searching and highlighting the word, then the toolbar at the bottom will advance and reverse go through the words.
I used "purus" which repeats.
I won't deny I gave a sigh of relief when you said it worked
Quote:
Next question is how to CLEAN up epub to be able to do this is the simpliest way?
I notice the two books i used that the one with chapters worked and the one with no chapters didnt work. is this a clue?
Yes, I have a feeling that an inconsistency between the ToC and the file structure breaks the search. Or if the ToC is broken. The ToC is loaded into the database when the books are imported and used from there for navigation. The search results might be relative to the ToC and if it is broken or absent, that would break the search.

And I have a test the demonstrates at least one method to reproduce this. I was recently reading something that had multiple chapters but, they were all in one file. After reading it, I used the calibre editor to split the chapters into separate files, rebuilt the ToC and resent it to the device without deleting the book. That means the book wasn't reimported and the ToC in the database didn't match the structure of the book. Deleting it from the device and resending the book fixed the problem.

I haven't tested it, but I am pretty sure that if the ToC in the book doesn't match the contents, you will see this problem as well. When importing the book, the ToC is read from the NCX file (for epub2) and it doesn't check that this matches the rest of the book. In this case, you an read the book from start to finish, but navigation (ToC, navigation bar, search) probably won't work.

And I don't consider this to be a bug in the firmware. It is an error in the book. If a fix was to be made, it would be to reject the book, but I consider being a bit forgiving and allowing the book to be loaded and read is actually a better scenario.
davidfor is offline   Reply With Quote