Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 11-28-2014, 08:56 AM   #1
Ruskie_it
Fanatic
Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.
 
Posts: 536
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
Search function not working

Not sure if I should post here, because I think this is more a thing of the EBOOK, not the editor, however:

I have one book (epub) for which the Search function does not seem to work.
That is, if I try to search for, say, a word, I get "no matches found", even when I have that word right in front of me on the page!
And yes, I am sure I have placed the cursor BEFORE that word with search direction running "down".

I think it's something related to the book however because search works with other ebooks. Additionally, I have tried in Sigil as well, with the same result: no matches found for any word, while it works with others.

So I was wondering: what could cause this problem in an ebook?

Thanks
Ruskie_it is offline   Reply With Quote
Old 11-28-2014, 08:59 AM   #2
Ruskie_it
Fanatic
Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.
 
Posts: 536
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
Uh-oh, never mind, I think I got it: it has to do with the HypenateThis! plugin. I'll post my question there
Ruskie_it is offline   Reply With Quote
Advert
Old 11-28-2014, 03:49 PM   #3
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
If you are using the hyphenation plugin, that corresponds to what I would have guessed the problem is... you are searching for
Code:
foobar
where the actual text is (unicode hyphens depicted as asterisks)
Code:
foo*bar*with*randomly*interspersed*hyphens
And you need to actually match the hyphens as well.

IIRC, calibre's Edit Book should show invisible characters as yellow spaces.
eschwartz is offline   Reply With Quote
Old 11-28-2014, 03:55 PM   #4
Ruskie_it
Fanatic
Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.
 
Posts: 536
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
Yes and no, because... that's what I guessed, actually, and what led me to try and make a test with the un-hypenated ebook.
But, when I open it in Sigil and in Calibre, and I mean html view, the text does not show like that: I can see the words as normal - which also made me wonder how hypenation was rendered; not knowing that much I supposed it was achieved in some way using css.
Ruskie_it is offline   Reply With Quote
Old 11-28-2014, 04:04 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Yeah, well I just tested it. The invisible unicode entity is invisible in Edit Book. I guess only visible characters get yellow highlights (  for example) and invisible ones are not shown at all. I guess that makes sense as well. I didn't bother checking in Sigil because I already know for sure it would be hidden.

You can tell by using the arrow keys to move through the text, paying particular attention to misspelled words (since hyphens where they don't belong are correctly marked as misspelled) and Edit Book will show in the bottom right corner which character is to the right of the cursor.

tl;dr your regex needs to check for U+00AD interspersed at total random.

Last edited by eschwartz; 11-28-2014 at 04:07 PM.
eschwartz is offline   Reply With Quote
Advert
Old 11-28-2014, 04:14 PM   #6
Ruskie_it
Fanatic
Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.
 
Posts: 536
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
Yeah, I guess it makes sense, too, at least with hypenation symbols.
But it would be even better if one could choose to hide or show them.

I don't get your last sentence, anyway it means to me that soft hypenation kinda breaks search functions, isn't it? This, unless your mention to regex expressions meant that it is possible to account for hypenation signs, however even in that case it would mean you're down to only use regex which is not cool at all if you are not used to work with them.
I understand this is not a fault of the editor but still... it's a shame
Ruskie_it is offline   Reply With Quote
Old 11-28-2014, 04:25 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
The search function in a plaintext editor shouldn't and won't strip non-displaying characters.

A simple regex like
Code:
f@?o@?o@?b@?a@?r
would find the word "foobar" with optional soft hyphens. Note: the at symbols are a placeholder for the aforementioned unicode ­ character.

You will indeed need a regex, because regexes are by definition what you use to find a fragment of text that can appear in multiple forms -- which is the case here.



On the other hand, I would venture to say, the best solution is... don't hyphenate the book until it reaches production and goes on your ereader. Remove all ­ symbols from the book (de-hyphenate it) and searching in ebook-editors will work properly.

Then hyphenate them when they are ready to be pushed to your device. The ereader/app should handle searching just fine, much like the way they don't break on span tags.
eschwartz is offline   Reply With Quote
Old 11-28-2014, 04:34 PM   #8
Ruskie_it
Fanatic
Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.
 
Posts: 536
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
Quote:
Originally Posted by eschwartz View Post
You will indeed need a regex, because regexes are by definition what you use to find a fragment of text that can appear in multiple forms -- which is the case here.
And yet... wouldn't it be so cool if, since the editor is smart enough not to show "invisible" characters, was able to search ignoring them?

Quote:
On the other hand, I would venture to say, the best solution is... don't hyphenate the book until it reaches production and goes on your ereader.
Yep, I was already doing that, actually. Since it is so simple (and quick too) to hypenate and dehypenate books, it doesn't really matter that the editor is not able to behave like I wrote above.
For sure, it is easier than using a regex like the one you sampled for every word I need to search!
Ruskie_it is offline   Reply With Quote
Old 11-28-2014, 05:10 PM   #9
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
It would be a travesty if the editor utterly failed to do it's job. So... GOD NO FOR HEAVENS SAKE!!!
eschwartz is offline   Reply With Quote
Old 11-28-2014, 05:17 PM   #10
Ruskie_it
Fanatic
Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.
 
Posts: 536
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
Quote:
Originally Posted by eschwartz View Post
It would be a travesty if the editor utterly failed to do it's job. So... GOD NO FOR HEAVENS SAKE!!!
Well no, come on... it might be switchable!
Something along the line "Account for hidden (or hypenation) in search function: Yes/No".
It wouldn't be THAT bad!
If I were Kovid I would push it very low on the feature development stack, since the workaround is really easy and simple, and yet... I'd consider it a nice to have.
Ruskie_it is offline   Reply With Quote
Old 11-28-2014, 05:24 PM   #11
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
As hyphenation with soft-hyphens like that gives issues in almost all ePUB readers, it should not be used at all in my opinion...
Toxaris is offline   Reply With Quote
Old 11-28-2014, 05:43 PM   #12
Ruskie_it
Fanatic
Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.
 
Posts: 536
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
Quote:
Originally Posted by Toxaris View Post
As hyphenation with soft-hyphens like that gives issues in almost all ePUB readers, it should not be used at all in my opinion...
I don't know in epub readers, but in kindle I've never seen a problem given by soft-hypenation.
On the other hand, Kindle does not support hypenation, it's one of its biggest flaws imho, but it can handle soft-hypenation.
Given the fact the I HATE HATE HATE, and I am not alone I think, the way a book gets displayed when no hypenation is available, with different spaces between words, sometimes with rows shorter than the rest of the text and so on... I am glad that the option to soft-hypenate the book exists.
Ruskie_it is offline   Reply With Quote
Old 11-29-2014, 03:54 AM   #13
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
We discussed this "issue" with non-printable characters (not only soft hyphens but zero length joiners or non joiners, and others, used more or less frequently in some languages). And Kovid said that there's no easy way to make them visible, let's say through specific or even just a general placeholder which meant "there's something hidden here, be careful".

But I really hope he could make some magic... (If MS Word is capable, why is not Calibre going to be?)
arspr is offline   Reply With Quote
Old 11-29-2014, 09:29 PM   #14
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by arspr View Post
We discussed this "issue" with non-printable characters (not only soft hyphens but zero length joiners or non joiners, and others, used more or less frequently in some languages). And Kovid said that there's no easy way to make them visible, let's say through specific or even just a general placeholder which meant "there's something hidden here, be careful".

But I really hope he could make some magic... (If MS Word is capable, why is not Calibre going to be?)
I knew there must've been some reason.

Now I remember -- and I bet it will indeed happen as soon as someone totally reimplements QPlainTextEdit to fix its support of invisible chars.
eschwartz is offline   Reply With Quote
Old 11-30-2014, 02:58 AM   #15
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
And yet another brainstorming about making non-printable characters visible: through named entities.
  • Calibre does prefer the usage of unicode characters over named entities. But this case could be the exception to that general rule.
  • I propose something like a "white-list" of named entities/"black-list" of their associated unicode characters. (Also fully customizable?)
  • Then some options which could cause:
    • Nothing. As Calibre currently beheaves. The default option.
    • Warn me. Whenever a new editor window is opened an automatic search is launched against the black-list. And you get a warning. But nothing else is done.
    • Automatically change when opening but revert on save. The black-listed unicode chars are automatically changed by entities. This procedure is reverted when saving. I mean that the epub/azw3 file on the HDD always contains unicode chars but the opened editor shows entities.
    • Preserve entities. The same as above but entities are preserved when saving.
Of course this scheme needs some polishing and those white-listed entities would also affect other areas of the code, like the main named entities check or the automated change into Unicode when typing the ending ";" ... But I think the general idea is more or less clear.

As I said just brainstorming mode.

Last edited by arspr; 11-30-2014 at 03:06 AM.
arspr is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mini Search function? AndrewH Kobo Reader 4 12-21-2013 11:20 AM
Touch Search function tkavan Kobo Reader 7 06-26-2012 09:54 AM
Odyssey No Search function? Fourvin Bookeen 4 01-09-2012 06:41 PM
PRS-350 Search function not working correctly skypilotpete Sony Reader 15 11-22-2011 10:05 PM
Why no search function? gatorfan Astak EZReader 6 08-24-2009 03:10 PM


All times are GMT -4. The time now is 03:38 AM.


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