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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-26-2010, 05:41 AM   #1
MacEachaidh
Browser
MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.
 
MacEachaidh's Avatar
 
Posts: 745
Karma: 578294
Join Date: Apr 2010
Location: Australia
Device: Kobo Touch, Kobo Aura HD
Typographic quotes broken after editing in Sigil

I have several epub files created with standard western font encoding, that I have opened in Sigil to embed cover graphics. After saving them, I find that typographic quotes have been converted to ... I'm not sure what. Unicode?

For instance, a typographic apostrophe now appears as ’, an open double-quote as “ and a close double-quote as �?.

Does this make sense to anyone? How do I fix it?

(I've seen it before in other contexts, and expect it has something to do with a specified encoding, but I don't know what's wrong and how to fix it.)

Thanks for any help.
MacEachaidh is offline   Reply With Quote
Old 08-26-2010, 07:02 AM   #2
Vintage Season
Pulps and dime novels...
Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.
 
Vintage Season's Avatar
 
Posts: 343
Karma: 1952003
Join Date: Jan 2009
Device: Kobo Aura/Kobo Aura One LE/iPad Air
Here is the darn-near-universal (a.k.a. "unicode") way to fix it:

Use the following for a typographic apostrophe: ’
Use the following for an open double-quote: “
Use the following for a close double-quote: ”

- M.
Vintage Season is offline   Reply With Quote
Advert
Old 08-26-2010, 07:44 AM   #3
MacEachaidh
Browser
MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.MacEachaidh ought to be getting tired of karma fortunes by now.
 
MacEachaidh's Avatar
 
Posts: 745
Karma: 578294
Join Date: Apr 2010
Location: Australia
Device: Kobo Touch, Kobo Aura HD
Thanks VS. But let me get this straight: aren't they Unicode codes? Doesn't that require the original document to be saved specifically as Unicode for these to display correctly?

What are the other ones I quoted, then, and why would they show up? I've seen them before showing up in documents in Microsoft Word (for instance), and assumed they were something to do with coding, but other than doing a find-and-replace on them didn't really know how to fix them. What are they, exactly?

And why would editing the file in Sigil - not changing either the body copy or the CSS, but simply embedding a jpg file as the cover - makes these weird codes show up?
MacEachaidh is offline   Reply With Quote
Old 08-26-2010, 08:02 AM   #4
Dave_S
What Title ?
Dave_S ought to be getting tired of karma fortunes by now.Dave_S ought to be getting tired of karma fortunes by now.Dave_S ought to be getting tired of karma fortunes by now.Dave_S ought to be getting tired of karma fortunes by now.Dave_S ought to be getting tired of karma fortunes by now.Dave_S ought to be getting tired of karma fortunes by now.Dave_S ought to be getting tired of karma fortunes by now.Dave_S ought to be getting tired of karma fortunes by now.Dave_S ought to be getting tired of karma fortunes by now.Dave_S ought to be getting tired of karma fortunes by now.Dave_S ought to be getting tired of karma fortunes by now.
 
Posts: 1,325
Karma: 1856232
Join Date: Jan 2009
Location: Bavaria Germany
Device: Sony Experia Z Ultra
Quote:
Originally Posted by MacEachaidh View Post
For instance, a typographic apostrophe now appears as ’, an open double-quote as “ and a close double-quote as �?.
FWIW, I usually see that kind of mixup when encoding="xxxx" is in the beginning of of the XHTML, but the text is actually encoded as "yyyy", where xxxx and yyyy are two different text encoding schemes. That usually seems to happen when MS tools are used, which generate win-1252 encoding which is badly incompatible with utf-8 for special characters.
Dave_S is offline   Reply With Quote
Old 08-26-2010, 09:03 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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
The ’ et al codes are not Unicode, they are HTML entities, and work whatever the real encoding of the file is.

You can write explicitly the needed character, but then it has to be in the correct declared encoding (and in ePUB, it must utf-8 or utf-16). If you mix encodings bad things happen.

A trick: when I need to differentiate between single quotes and apostrophes, I use ‘ ’ for the quotes and & #8217; (without space) for the apostrophe. The character is exactly the same, but that allows for better search and replace in the future. I don't know if Sigil would keep this, though.
Jellby is offline   Reply With Quote
Advert
Old 08-26-2010, 09:28 AM   #6
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by MacEachaidh View Post
I have several epub files created with standard western font encoding, that I have opened in Sigil to embed cover graphics. After saving them, I find that typographic quotes have been converted to ... I'm not sure what. Unicode?

For instance, a typographic apostrophe now appears as ’, an open double-quote as “ and a close double-quote as �?.
Quote:
Originally Posted by Dave_S View Post
FWIW, I usually see that kind of mixup when encoding="xxxx" is in the beginning of of the XHTML, but the text is actually encoded as "yyyy", where xxxx and yyyy are two different text encoding schemes. That usually seems to happen when MS tools are used, which generate win-1252 encoding which is badly incompatible with utf-8 for special characters.
Dave_S has it right. Your encodings are mixed up. The file is probably declaring the use of one encoding, but actually using another. Or it's declaring the use of two encodings (which is impossible).

Sigil looks at the encoding declared and converts the bytestream from that encoding into UTF-16. As long as the file is truthful about it's encoding , this works great.

Quote:
Originally Posted by Jellby View Post
A trick: when I need to differentiate between single quotes and apostrophes, I use ‘ ’ for the quotes and & #8217; (without space) for the apostrophe. The character is exactly the same, but that allows for better search and replace in the future. I don't know if Sigil would keep this, though.
It should.
Valloric is offline   Reply With Quote
Old 08-27-2010, 09:31 AM   #7
Vintage Season
Pulps and dime novels...
Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.
 
Vintage Season's Avatar
 
Posts: 343
Karma: 1952003
Join Date: Jan 2009
Device: Kobo Aura/Kobo Aura One LE/iPad Air
Quote:
Originally Posted by Jellby View Post
A trick: when I need to differentiate between single quotes and apostrophes, I use ‘ ’ for the quotes and & #8217; (without space) for the apostrophe. The character is exactly the same, but that allows for better search and replace in the future. I don't know if Sigil would keep this, though.
Thanks for that tip! (It's one of many "I should have thought of that" permutations I've encountered on these forums...)

- M.
Vintage Season is offline   Reply With Quote
Old 08-27-2010, 09:33 AM   #8
Vintage Season
Pulps and dime novels...
Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.Vintage Season ought to be getting tired of karma fortunes by now.
 
Vintage Season's Avatar
 
Posts: 343
Karma: 1952003
Join Date: Jan 2009
Device: Kobo Aura/Kobo Aura One LE/iPad Air
Quote:
Originally Posted by MacEachaidh View Post
Thanks VS. But let me get this straight: aren't they Unicode codes? Doesn't that require the original document to be saved specifically as Unicode for these to display correctly?
As Jellby correctly pointed out, those are HTML entities, and not Unicode. I should not have used that word in my original description.

- M.
Vintage Season 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
Change single quotes to double quotes Elfwreck Workshop 16 04-26-2013 10:06 AM
convert straight quotes to curly quotes alansplace Calibre 3 09-25-2010 03:51 PM
calibre-inserted covers not getting imported by reader after editing with Sigil tonyx3 Sigil 5 06-02-2010 05:43 AM
Sigil editing Issues -- must be addressed arvinder Sigil 4 08-06-2009 07:36 AM


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


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