[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

Marc-Andre Lemburg report at bugs.python.org
Mon Apr 7 21:49:38 CEST 2008


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Agreed, but any change will target the package authors who can easily
upgrade their packages to use Unicode for e.g. names.

If the change were to address distutils users, we'd have to be a lot
more careful.

In any case, if UTF-8 is the defacto standard used in older packages,
then we should probably use that as fallback solution if the ASCII
assumption doesn't work out:

try:
    value = unicode(value)
except UnicodeDecodeError:
    value = unicode(value, 'utf-8')
value = value.encode('utf-8')

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2562>
__________________________________


More information about the Python-bugs-list mailing list