![]() |
#1 |
Browser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#2 |
Pulps and dime novels...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Browser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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? |
![]() |
![]() |
![]() |
#4 |
What Title ?
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,325
Karma: 1856232
Join Date: Jan 2009
Location: Bavaria Germany
Device: Sony Experia Z Ultra
|
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.
|
![]() |
![]() |
![]() |
#5 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
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. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |||
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Quote:
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 ![]() Quote:
|
|||
![]() |
![]() |
![]() |
#7 | |
Pulps and dime novels...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 343
Karma: 1952003
Join Date: Jan 2009
Device: Kobo Aura/Kobo Aura One LE/iPad Air
|
Quote:
- M. |
|
![]() |
![]() |
![]() |
#8 | |
Pulps and dime novels...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 343
Karma: 1952003
Join Date: Jan 2009
Device: Kobo Aura/Kobo Aura One LE/iPad Air
|
Quote:
- M. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |