Hello List,
I'm working on an multilingual setup using Sphinx. Therefore I'm using
the CollectLabelsBuilder from [1] and its working well for English text.
If I have titles containing German umlauts then I hit on the following
error:
UnicodeEncodeError: 'ascii' codec can't encode character...
So I was looking at the code and append to each string
".encode("utf-8")". Here is code snippet:
outfile.write("""\t%s :ref:`%s <%s>`\n""" %
((label[0].ljust(30)).encode("utf-8"),
(label[1][2]).encode("utf-8"),(label[0]).encode("utf-8")))
Its now working, I get the title with umlauts collected. But I'm not
sure if this is the right way to patch. Maybe its just an coincidence...
Would the code above also work with other languages like the Asian ones,
French, Greek... ?
Thanks in advance for any feedback.
Lars
[1]
http://groups.google.com/group/sphinx-dev/browse_thread/thread/f860f6c52e60e40f/cad08862e19b29d9?hl=en&#cad08862e19b29d9
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---