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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-31-2012, 06:50 PM   #1
PL_kolek
Junior Member
PL_kolek began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2012
Device: Kindle
Search and Replace - possible bug?

Hello!
From the information on this forum:
Quote:
Note that the search & replace operates on the XHTML Calibre produces during conversion, not on the original file.
But I think that is not true. I have a TXT file with a string "* * *" being some kind of a chapter beginning. When I choose search and replace for this file, I can see the XHTML file. The stars are missing (another problem), but I have string "<i> </i>" in the same places. So I fill the search for field with:
Code:
<i> </i>
,
get around 70 hits, and replace it with, let's say 123456. Then I convert, and there is no such string in the output file, so no replaces took place, despite those hits.

However, when I make such search:
Code:
\* \* \*
,
get no hits at all, but all 70 entries in the source txt (not xhtml in the middle of the conversion) get substituted.

For that seems like a huge bug, or at least not predictable behaviour. When I see hits, I expect my substitutions to really work. When I get no hits, there should be no replacements. I think the order of conversion is wrong. FIt should first make it xhtml and then apply s&r, not the other way. Or (I would really love if that would work that way) we could specify 2 searches, one for the source file and the second for the middle xhtml

When I searched that forum for topics according to this functionality (s&r), I found few people havin the same problem as I had (not the first time, though). The results were unpredictable and replacing didn't work at all.
PL_kolek is offline   Reply With Quote
Old 10-31-2012, 11:19 PM   #2
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: 43,775
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The way txt input is interpreted is heavily dependent on heuristics and conversion options. Convert to a more stable format like epub of htmlz first, then reconvert that and run S&R on it.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-01-2012, 06:56 AM   #3
PL_kolek
Junior Member
PL_kolek began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2012
Device: Kindle
But in my opinion the order of conversion shouldn't depend on format. If I see something in the wizard, and then it isn't applied to my e-book just because Calibre in the background uses it in the other phase, then something is wrong.

Thanks for the tip, I'll try that also.
PL_kolek 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
Find/Replace bug? bfollowell Sigil 14 05-19-2012 01:14 PM
Search and replace TdeV Sigil 1 10-30-2011 04:45 PM
search and replace - drops blanks in replace ? cybmole Conversion 10 03-13-2011 03:07 AM
Search and replace in 0.2.0 paulpeer Sigil 7 03-13-2010 11:59 AM
Why no search and replace? charleski Sigil 10 11-24-2009 04:13 PM


All times are GMT -4. The time now is 12:12 PM.


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