There is this three year old issue still open over on the Python bug tracker: http://bugs.python.org/issue18378
Basically, it is about "UTF-8" as a possible value for LC_CTYPE on OS X and the inability of Python's locale module to deal with it. Although this is essentially a Python problem I think 90 % of users who run into this issue do so by directly or indirectly using docutils, which bumps into the issue at:
/error_reporting.py:47: locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
Wouldn't it be worthwhile catching the resulting
ValueError: unknown locale: UTF-8
and simply set locale_encoding to "UTF-8" in this particular case? Would make life a bit easier for many Mac users.
something like this?
yes, pretty much like that just that the
except ValueError, errorpart would have to read
except ValueError as errorand it should check
if "unknown locale: UTF-8" in error.args. Both for compatibility with Python3
Thanks for the review.
Patch commited in revision 7947.
(Compatibility with Py3.x is handled by 2to3 conversion during installation,
using "as error" in the 2.x source would break 2.4 compatibility.)
Please reopen if it does not work as expected.
Sounds good to me then, thank you!