Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-01-2011, 02:38 AM   #1
Artha
-----
Artha began at the beginning.
 
Posts: 114
Karma: 10
Join Date: Jun 2011
Device: Samsung SNE65
Quite odd replace result

I have searched and replaced all instances of minus with en–dash. The result meant all XHTML pages were reset. The same number of files, the same name files, the same list order, each one with only the initial string of a new file. Have I stumbled upon a feature? There's no regex set up or anything and it's repeatable.

Also: is there a way to do that replace for all XHTML files, to be more precise to the text only and not going into the tags? Because Sigil refuses to do that while in Book View.
Artha is offline   Reply With Quote
Old 12-01-2011, 03:02 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,781
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Artha View Post
I have searched and replaced all instances of minus with en–dash. The result meant all XHTML pages were reset. The same number of files, the same name files, the same list order, each one with only the initial string of a new file. Have I stumbled upon a feature? There's no regex set up or anything and it's repeatable.

Also: is there a way to do that replace for all XHTML files, to be more precise to the text only and not going into the tags? Because Sigil refuses to do that while in Book View.
No
You must use code view for a replace in all HTML files.

You probably want to use lots of care in CV because minus might be part of a class name (selector), header or a negative value in a style attribute
theducks is online now   Reply With Quote
Advert
Old 12-01-2011, 07:05 AM   #3
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
You've discovered a bug that will be fixed eventually. Every file starts with

Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
When you replace every - with &ndash; you also replace the - in the encoding. This causes the XML parser to be unable to parse the document and produces an empty file.
user_none is offline   Reply With Quote
Old 12-01-2011, 05:06 PM   #4
Artha
-----
Artha began at the beginning.
 
Posts: 114
Karma: 10
Join Date: Jun 2011
Device: Samsung SNE65
Can the replace function tuned to work only outside the tags? Only with the actual text.
Artha is offline   Reply With Quote
Old 12-02-2011, 05:20 AM   #5
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Maybe if you work in book view instead of code view.
Jellby is online now   Reply With Quote
Advert
Old 12-02-2011, 10:46 AM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,781
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Jellby View Post
Maybe if you work in book view instead of code view.
That was the initial problem. The OP wanted a global replace and BV restricts you to Opening each section (file) and applying the replace.
theducks is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EPUB to MOBI - result is outrageous sebdea Conversion 2 05-25-2011 01:03 PM
search and replace - drops blanks in replace ? cybmole Conversion 10 03-13-2011 03:07 AM
Every try something new as a result of reading an old book? JeremyZ News 16 10-09-2009 10:36 AM
Strange result in Search KlondikeGeoff Feedback 18 08-20-2007 11:19 AM
How to get best result with SonyReader MosFet Sony Reader 5 06-17-2007 08:05 AM


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


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