classification
Title: Umlauts make conf.latex_documents fail
Type: behavior Stage:
Components: Documentation tools (Sphinx) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, hoel
Priority: normal Keywords:

Created on 2008-07-30 08:30 by hoel, last changed 2008-08-01 19:42 by georg.brandl. This issue is now closed.

Files
File name Uploaded Description Edit
sphinx-err-l_u8H4.log hoel, 2008-07-30 08:30 full traceback for error message
Messages (4)
msg70419 - (view) Author: Berthold Höllmann (hoel) Date: 2008-07-30 08:30
For a Project of mine I have set latex_documents to something like

latex_documents = [
  ('index', 'doc.tex', 'Documentation', 'Berthold Höllmann', 'manual'),
]

With this processing fails with:

LANG=C make latex
mkdir -p build/latex build/doctrees
sphinx-build -b latex -d build/doctrees -D latex_paper_size=a4 -N source
build/latex
Sphinx v0.4.2, building latex
trying to load pickled env... done
building [latex]: all documents
updating environment: 0 added, 1 changed, 0 removed
reading... index
pickling the env... done
checking consistency...
processing CrossSolverTests.tex... index
resolving references...
writing... Exception occurred:
  File
"/usr/software/gltools/python/Python-2.5/lib/python2.5/site-packages/Sphinx-0.4.2-py2.5.egg/sphinx/latexwriter.py",
line 162, in astext
    '\\renewcommand{\\indexname}{Index}\n' or '') + \
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
206: ordinal not in range(128)
The full traceback has been saved in /tmp/sphinx-err-l_u8H4.log, if you
want to report the issue to the author.
Please also report this if it was a user error, so that a better error
message can be provided next time.
Send reports to sphinx-dev@googlegroups.com. Thanks!
make: *** [latex] Error 1

changing ö to \"o does work.
msg70441 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-07-30 22:49
Did you try using a Unicode string? IIRC the docs explicitly say that if
you include non-ASCII chars in the config you should use Unicode strings.
msg70487 - (view) Author: Berthold Höllmann (hoel) Date: 2008-07-31 06:47
OK, using Unicode strings in conf.py does work, so make this a Bug in
sphinx-quickstart. My conf.py was generated by sphinx-quickstart, When
asked for the author(s) name I gave my name and conf.py was generated
with a simple string for the name information instead of a Unicode string.
msg70588 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-08-01 19:42
Indeed, you're correct with that. This is now fixed in the 0.4 branch
with r65375.
History
Date User Action Args
2008-08-01 19:42:43georg.brandlsetstatus: pending -> closed
resolution: fixed
messages: + msg70588
2008-07-31 06:47:54hoelsetmessages: + msg70487
2008-07-30 22:49:11georg.brandlsetstatus: open -> pending
messages: + msg70441
2008-07-30 08:30:42hoelcreate