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-13-2010, 08:22 AM   #1
ChrisI
Connoisseur
ChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-books
 
Posts: 55
Karma: 847
Join Date: Sep 2007
Device: Kobo H2O, Libre 2
What happened to my extended characters?

I have an e-pub that contains things like smart quotes and em dashes. It displays just fine on my Sony Reader.

I opened the document in Sigil hoping to correct a few typos, and all my extended characters are being displayed as "a circumflex" in code view.

Can someone explain what happened? This is my first attempt at editing an e-pub, and my first use of Sigil, so I have a steep learning curve.

Thanks,

Chris.
ChrisI is offline   Reply With Quote
Old 05-13-2010, 10:21 AM   #2
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
You're file is probably incorrectly stating its encoding. I couldn't tell you more without seeing the file in question.
Valloric is offline   Reply With Quote
Old 05-13-2010, 09:01 PM   #3
ChrisI
Connoisseur
ChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-books
 
Posts: 55
Karma: 847
Join Date: Sep 2007
Device: Kobo H2O, Libre 2
This is from the top of the file for chapter 1:

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=iso-8859-1" />

<title>The Cardinal of the Kremlin</title>
<link rel="stylesheet" href="../Styles/clan_9781101002384_oeb_css_r1.css" type="text/css" />
<meta content="urn:uuid:450bc958-e7cc-416b-9f8d-e20e7910b456" name="Adept.resource" />

<style type="text/css">
div.sgc-2 {font-style: italic}
div.sgc-1 {font-weight: bold}
</style>
</head>

I assume the first line should be more like this:

<?xml version="1.0" encoding="UTF-8" ?>

How do I know what encoding to use?

Every time I change it in Sigil, it changes back.

I did try running the file through epubcheck-1.0.5. It says no errors or warnings detected.

Last edited by ChrisI; 05-13-2010 at 09:38 PM.
ChrisI is offline   Reply With Quote
Old 05-14-2010, 02:12 AM   #4
paulpeer
Zealot
paulpeer is on a distinguished road
 
paulpeer's Avatar
 
Posts: 147
Karma: 56
Join Date: Dec 2009
Location: Antwerpen
Device: iPhone, Sony PRS-505, EPUBreader
Quote:
Originally Posted by ChrisI View Post
I assume the first line should be more like this:

<?xml version="1.0" encoding="UTF-8" ?>
That's right. I guess the offending part is
Code:
<meta content="text/html; charset=iso-8859-1" />
Delete this, and see if that solves the problem.
paulpeer is offline   Reply With Quote
Old 05-14-2010, 04:55 AM   #5
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
The meta tag is the problem.
Valloric is offline   Reply With Quote
Old 05-15-2010, 02:55 PM   #6
ChrisI
Connoisseur
ChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-books
 
Posts: 55
Karma: 847
Join Date: Sep 2007
Device: Kobo H2O, Libre 2
Thank you for your help. The meta tag was the problem, but by the time the file is open in Sigil it is too late to fix it.

I found out I could open the epub with WinZip, and then use XML Notepad to edit the contents. I used this to delete the meta tag from each chapter, and then Sigil could open and display the file properly.

One thing I noticed is that the original file contained the encoding="UTF-8", but after opening it in Sigil it was not visible in the code view. Is this normal?

Also, why does the meta tag confuse Sigil, but not the Sony Reader?
ChrisI is offline   Reply With Quote
Old 05-15-2010, 03:12 PM   #7
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 ChrisI View Post
Also, why does the meta tag confuse Sigil, but not the Sony Reader?
I've explained this several times.

In the XML declaration, you are saying that the file is encoded in encoding A. In the meta tag, you are saying it's in encoding B. Sigil has no way of knowing which of these is correct. Specifying both makes loading this file a coin toss: some applications will load it as having encoding A, and some will load it as having encoding B. The applications are not at fault.

Firefox is one of the applications that will look at the meta tag first, as will Sigil. RMSDK (which is in the Sony Reader) on the other hand looks at the XML declaration first and picks that encoding.

None of these applications are wrong or right: the epub is saying two different things, and it's a matter of chance what will be believed.

It goes without saying that the spec forbids listing two different encodings, and that a file that actually has two different encodings is not even theoretically possible. Thus when you specify two, only one can be correct.

So you need to remove the incorrect one, which in this specific instance was the meta tag.
Valloric is offline   Reply With Quote
Old 05-15-2010, 11:37 PM   #8
ChrisI
Connoisseur
ChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-books
 
Posts: 55
Karma: 847
Join Date: Sep 2007
Device: Kobo H2O, Libre 2
Quote:
Originally Posted by Valloric View Post
It goes without saying that the spec forbids listing two different encodings, and that a file that actually has two different encodings is not even theoretically possible. Thus when you specify two, only one can be correct.
This makes perfect sense. So what's the best way to validate an epub file?

As I said earlier, I tried epubcheck-1.0.5 and it said the file was fine.
ChrisI is offline   Reply With Quote
Old 05-16-2010, 07:31 AM   #9
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 ChrisI View Post
This makes perfect sense. So what's the best way to validate an epub file?

As I said earlier, I tried epubcheck-1.0.5 and it said the file was fine.
Epubcheck is far from perfect. There isn't anything else that would validate your epubs.

On a related note, I'll be developing an application/library over the summer that will do what epubcheck does (only better). This will then be integrated into Sigil.
Valloric is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extended Warranty vmill Amazon Kindle 9 09-17-2010 06:46 PM
Accessories Extended Warranty cvkemp Amazon Kindle 5 09-11-2010 12:09 AM
Extended Warranty ?? IvoryAngel Amazon Kindle 7 02-24-2010 05:26 PM
Extended power for the Cybook ProfJulie Bookeen 7 03-28-2008 09:27 PM
Extended characters jbenny Upload Help 28 10-12-2007 10:03 AM


All times are GMT -4. The time now is 05:31 AM.


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