rst_epilog in conf.py with non-ASCII chars

Jan Ulrich Hasecke avatarJan Ulrich Hasecke created an issue

When I put this in conf.py:

rst_epilog = """
.. |kk| replace:: Krzysztof Kieślowski
"""

I get this error:

make html
sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v0.6.5
WARNING: the config value 'rst_epilog' is set to a string with non-ASCII characters; this can lead to Unicode errors occurring. Please use Unicode strings, e.g. u"Content".
loading translations [de]... done
loading pickled environment... done
building [html]: targets for 0 source files that are out of date
updating environment: [config changed] 42 added, 0 changed, 0 removed
reading sources... [  2%] Analyse/Dauer         
Sphinx error:
'ascii' codec can't decode byte 0xc5 in position 34: ordinal not in range(128)
make: *** [html] Error 1

Comments (4)

  1. Georg Brandl

    That is not a unicode string, but a unicode escape for use within a unicode string. A unicode string is prefixed with "u", for example:

    rst_epilog = u"""
    .. |kk| replace:: Krzysztof Kieślowski
    """
    
  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.