View Single Post
Old 11-10-2015, 08:23 AM   #1
crankypants
Hmm.
crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.
 
Posts: 124
Karma: 2016606
Join Date: Oct 2015
Device: Android 4.2 Google Play Reader
How to allow extended ASCII German characters in my EPUB?

I'm writing a tool to make basic EPUB2 books from a configuration file, and Markdown files (which are converted to XHTML). I didn't find anything else that suited my needs as I have large text files I want to convert to EPUB, and add basic formatting to them.

Currently, the Firefox plugin EPUBReader, which I use to test with, seems to choke on ASCII characters over 127. How do I allow ASCII characters and German characters in my EPUB? Do I have to change something in the XHTML header?

I can write my software to change these extended ASCII characters to Unicode but EPUBreader seems to produce an error with any unicode also, except named entities.

The ERROR I'm getting from EPUBReader about the German characters is:

Code:
XML Parsing Error: not well-formed Location: 
file:///C:/Users/XXX/AppData/Roaming/Mozilla/Firefox/Profiles/0ddipa6u.default/epub/54/OEBPS/Text/00intro.xhtml#H2_00intro_00003 
Line Number 27, Column 4:
And then it points to an extended ASCII character.

The header for each XHTML file is this:


Quote:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title>$bldtitle</title>

Last edited by crankypants; 11-10-2015 at 09:46 AM. Reason: added code tags to cope with very long line
crankypants is offline   Reply With Quote