epub UTF-8 title

faw avatarfaw created an issue

Setting UTF-8 string in the 'epub_title' causes this exception.

  • Sphinx version: 1.0
  • Docutils version: 0.5 release
  • Jinja2 version: 2.4

File "/usr/local/lib/python2.6/site-packages/Sphinx-1.0dev_20100413-py2.6.egg/sphinx/builders/epub.py", line 245, in handle_finish self.build_content(self.outdir, 'content.opf') File "/usr/local/lib/python2.6/site-packages/Sphinx-1.0dev_20100413-py2.6.egg/sphinx/builders/epub.py", line 339, in build_content self.content_metadata(projectfiles, spine)) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 9: ordinal not in range(128)

Comments (2)

  1. Georg Brandl

    You need to make that string a Unicode string, e.g.

    epub_title = u'Title with Ünicode characters'
    

    You should have gotten a warning about that, like

    WARNING: the config value 'epub_title' is set to a string with non-ASCII characters;
    this can lead to Unicode errors occurring. Please use Unicode strings, e.g. u"Content".
    
  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.