11-28-2014, 08:56 AM | #1 |
Fanatic
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 |
11-28-2014, 08:59 AM | #2 |
Fanatic
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
|
Advert | |
|
11-28-2014, 03:49 PM | #3 |
Ex-Helpdesk Junkie
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 Code:
foo*bar*with*randomly*interspersed*hyphens IIRC, calibre's Edit Book should show invisible characters as yellow spaces. |
11-28-2014, 03:55 PM | #4 |
Fanatic
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. |
11-28-2014, 04:04 PM | #5 |
Ex-Helpdesk Junkie
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. |
Advert | |
|
11-28-2014, 04:14 PM | #6 |
Fanatic
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 |
11-28-2014, 04:25 PM | #7 |
Ex-Helpdesk Junkie
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 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. |
11-28-2014, 04:34 PM | #8 | ||
Fanatic
Posts: 536
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
|
Quote:
Quote:
For sure, it is easier than using a regex like the one you sampled for every word I need to search! |
||
11-28-2014, 05:10 PM | #9 |
Ex-Helpdesk Junkie
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!!!
|
11-28-2014, 05:17 PM | #10 | |
Fanatic
Posts: 536
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
|
Quote:
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. |
|
11-28-2014, 05:24 PM | #11 |
Wizard
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...
|
11-28-2014, 05:43 PM | #12 | |
Fanatic
Posts: 536
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
|
Quote:
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. |
|
11-29-2014, 03:54 AM | #13 |
Dead account. Bye
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?) |
11-29-2014, 09:29 PM | #14 | |
Ex-Helpdesk Junkie
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:
Now I remember -- and I bet it will indeed happen as soon as someone totally reimplements QPlainTextEdit to fix its support of invisible chars. |
|
11-30-2014, 02:58 AM | #15 |
Dead account. Bye
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
And yet another brainstorming about making non-printable characters visible: through named entities.
As I said just brainstorming mode. Last edited by arspr; 11-30-2014 at 03:06 AM. |
|
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 |