encoding issues

Anonymous avatarAnonymous created an issue

Sphinx crashes if there is a non-ascii character in a comment. See this full log:

progval@Andromede:~/workspace/Supybot/website/doc$ make html
sphinx-build -b html -d _build/doctrees   . _build/html
Making output directory...
Running Sphinx v1.1.3
loading pickled environment... not yet created
building [html]: targets for 103 source files that are out of date
updating environment: 103 added, 0 changed, 0 removed
reading sources... [  3%] develop/callbacks                                                                                                                                                                
Sphinx error:
'ascii' codec can't decode byte 0xc2 in position 10731: ordinal not in range(128)
make: *** [html] Erreur 1

progval@Andromede:~/workspace/Supybot/website/doc$ cat develop/callbacks.rst
*****************
supybot.callbacks
*****************

.. automodule:: supybot.callbacks
   :members:

progval@Andromede:~/workspace/Supybot/Limnoria/src$ python
Python 2.7.3 (default, Jan  2 2013, 13:56:14) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> repr(open('callbacks.py', 'r').read()).find('xc2')
11100
>>> repr(open('callbacks.py', 'r').read())[11050:11150]
':\\n            token = token[1:-1]\\n            #\\xc2\\xa0FIXME: No need to tell you this is a hack.\\'

Comments (5)

  1. 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.