Docbook/XML with UTF-8

I am writing a book about Java 6 programming, the basics. My intention is to use it at my work as a teacher in high-school. First I used LaTeX for typesetting the book, LaTeX is nice I think. But today I suddenly changed my mind and converted it to DocBook/XML . Don’t ask me why - I just thought it was a good idea.

So there I was, five chapters written and ready for being sent to my friend for proof-reading. Typed the command:

$ jw -f docbook -b pdf dtr1207.xml

I got many errors like this:
openjade:/home/jonas/dtr1207-java/dtr1207.xml:303:9:E: non SGML character number 150

It seemed to be the char “Ö” that were the problem. I changed it to “ö” and the pdf were built fine. But I couldn’t change every Ö in my text to ö just because of a stupid buildprocess. Google wasn’t very helpful either. Then suddenly I read about SP_ENCODING.

$ SP_ENCODING=”UTF-8″ jw -f docbook -b pdf dtr1207.xml

SP_ENCODING can be set to XML or UTF-8. If it is set to XML it will read the XML-tag in document and use that encoding, I choosed to force it to be UTF-8.

Posted in docbook at February 21st, 2008. Trackback URI: trackback
Tags: ,

No Responses to “Docbook/XML with UTF-8”

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>