View Single Post
Old 03-08-2010, 02:55 PM   #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
Quote:
Originally Posted by paulpeer View Post
Hence my similar question: Can Sigil add an encoding declaration to the OPF?
The XML standard states that an XML document without an "encoding" attribute in the XML declaration is encoded in either UTF-8 or UTF-16. If it is encoded in UTF-16, then it MUST have a Byte Order Mark. Therefore, if it doesn't have an encoding attribute and it doesn't have a BOM, it must be UTF-8.

In plain English, UTF-8 is the default character encoding for XML. I thought everyone knew that.

But I'll add the attribute, it can't hurt.

EDIT: And here's the source. Just invert the negatives.

Quote:
... it is a fatal error [...] for an entity which begins with neither a Byte Order Mark nor an encoding declaration to use an encoding other than UTF-8.

Last edited by Valloric; 03-08-2010 at 03:11 PM.
Valloric is offline   Reply With Quote