Character '\xd1' result in TypeError
Using Sphinx 0.6.1 on a Mac OS 10.5.7 (using built-in Python 2.5.1) if a document contains a long dash (— in html, easily typed on a Mac using Alt-Shift-Minus) I get this exception:
File "/Library/Python/2.5/site-packages/Sphinx-0.6.1-py2.5.egg/sphinx/environment.py", line 537, in warn_and_replace linestart = error.object.rfind('\n', None, error.start) TypeError: slice indices must be integers or None or have an __index__ method
I have attached the full traceback and an example source file. I created the file in TextEdit, the default Mac OS X editor, and it looks like the file is not UTF-8, but "Mac OS Roman" and represents the long dash as '\xd1'. So it looks like this character is responsible for the error.
Of course when I save the file as UTF-8 everything works, so this is what I will do.