Issues

Issue #386 resolved

epub UTF-8 title

faw
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 (3)

  1. Georg Brandl repo owner

    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