Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-19-2019, 04:39 PM   #1
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
entity replacements gone haywire

I had an em dash, written in the format "ampersand pound sign 8212 semicolon" and every time I opened or saved it was replacing the ampersand with & so that after awhile I ended up with

&a mp;amp;amp;amp;amp;amp;amp;amp;#8212;

I've since turned off the Mend XHTML source code on open and save as a workaround. I looked at my sigil.ini and it has

preserve_entity_names="*", "©", "&", "—"
preserve_entity_codes=\xa0\xa9&\x2014

(The web page forum software here replaced the entity codes above; in my sigil.ini they are in the "ampersand pound sign number semicolon" format. The first one, the asterisk, is number 160 in my sigil.ini file.)

In my preferences I have it set to create new epubs as version 3, validation levels for css are set to 3 for both.

Sigil version 5.11.2.

Last edited by lumpynose; 05-19-2019 at 04:55 PM.
lumpynose is offline   Reply With Quote
Old 05-19-2019, 05:01 PM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
@lumpynose

For some reason Sigil doesn't like the decimal notation of the em dash (—) but the hexadecimal equivalent — will survive if you add it to the Entities to Preserve list.
Doitsu is offline   Reply With Quote
Advert
Old 05-19-2019, 05:04 PM   #3
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Quote:
Originally Posted by Doitsu View Post
@lumpynose

For some reason Sigil doesn't like the decimal notation of the em dash (—) but the hexadecimal equivalent — will survive if you add it to the Entities to Preserve list.
Ok, I have to admit it; that made me laugh. I had no idea we could use hexidecimal or decimal.

Is octal also an option? Or maybe even binary?

But thanks, that's one to remember.
lumpynose is offline   Reply With Quote
Old 05-19-2019, 05:09 PM   #4
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Dammit, it won't let me use &#A9; or &#A0;, apparently only numerics.
lumpynose is offline   Reply With Quote
Old 05-19-2019, 05:11 PM   #5
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
I wish sigil had 2 colums for that preserve entities window; the 2nd column for a comment saying what that gibberish in the first column means.
lumpynose is offline   Reply With Quote
Advert
Old 05-19-2019, 05:50 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,550
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
EPUB3 (html5) is numeric-only for entities. That's a spec thing.
DiapDealer is offline   Reply With Quote
Old 05-19-2019, 05:52 PM   #7
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Quote:
Originally Posted by DiapDealer View Post
EPUB3 (html5) is numeric-only for entities. That's a spec thing.
So what am I doing wrong? I had to remove all of the numeric entities from my preferences in the Entities to Preserve window, otherwise it was mangling them and replacing the ampersands with amp; and whatnot.
lumpynose is offline   Reply With Quote
Old 05-19-2019, 05:56 PM   #8
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Quote:
Originally Posted by DiapDealer View Post
EPUB3 (html5) is numeric-only for entities. That's a spec thing.
In my xhtml files whenever I use the form "ampersand pound sign 38 semicolon" and save and reopen the file, sigil replaces that with "ampersand amp semicolon". In my preferences the Entities to Save is empty.
lumpynose is offline   Reply With Quote
Old 05-19-2019, 06:05 PM   #9
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
If I put "& # 38 ;" and "& amp ;" in the entities to preserve and then use "& # 38 ;" in the text, when I open the file it's replaced with &. (Remove the spaces from the quoted stuff.)

Last edited by lumpynose; 05-19-2019 at 06:07 PM.
lumpynose is offline   Reply With Quote
Old 05-19-2019, 06:08 PM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,550
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
What version of Sigil? What O.S.?
(5.11.2 is the Qt5 version, not a Sigil version number)

I don't have any trouble with the latest Sigil using entities. Perhaps your Sigil.ini file is corrupt. Back it up, delete it (or rename it) and relaunch Sigil so it generates a new one. See if that fixes the issue.

You really shouldn't have an empty Preserve Entities list. The bare minimum is   (for EPUB3) and   (for EPUB2). That's why   is added by default. Bad things can happen if you run without one or the other (though I've never encountered the issues you're describing).

The next versions of Sigil will be able to run without any entries in the Preserve Entities list.
DiapDealer is offline   Reply With Quote
Old 05-19-2019, 06:09 PM   #11
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
My xhtml file starts with

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
And my content.opf starts with

Code:
<?xml version="1.0" encoding="utf-8"?>
<package version="3.0" unique-identifier="BookId" xmlns="http://www.idpf.org/2007/opf">
lumpynose is offline   Reply With Quote
Old 05-19-2019, 06:10 PM   #12
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Oops, sorry about the version number, and I thought I was being so careful about that.

Version 0.9.13, Build time 2019.03.21, Windows 10.
lumpynose is offline   Reply With Quote
Old 05-19-2019, 06:12 PM   #13
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,550
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Doitsu View Post
For some reason Sigil doesn't like the decimal notation of the em dash (&#8212;) but the hexadecimal equivalent &#x2014; will survive if you add it to the Entities to Preserve list.
That's news to me I just fired up an older and newer version of Sigil on Windows/Linux and had no trouble with &#8212; being in the Preserve Entities list (and being correctly preserved when saving/opening/mending xhtml).
DiapDealer is offline   Reply With Quote
Old 05-19-2019, 06:16 PM   #14
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Nope, after deleting the sigil.ini file it's still replacing "& # 38 ;" with "& amp ;" when I open the file.
lumpynose is offline   Reply With Quote
Old 05-19-2019, 06:16 PM   #15
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,550
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
My guess is that you're trying to enter entities in Book View. That would certainly result in the mess you're describing. If so ... don't do that. Entities are code and should only be entered in Code View.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Google Translate Html -> Epub Can Make Calibre Go Haywire MarjaE Conversion 1 05-09-2016 02:59 AM
Readers go haywire when new? susaz General Discussions 19 11-13-2013 07:48 AM
Find and replace entity roger64 Sigil 3 10-12-2012 10:13 AM
The entity name must immediately follow the '&' in the entity reference digireads Calibre 3 06-08-2010 10:31 PM
ToC going haywire JaneFancher Calibre 2 04-09-2010 10:03 PM


All times are GMT -4. The time now is 11:10 AM.


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