[issue2931] optparse: various problems with unicode and gettext
Sean Wang
report at bugs.python.org
Thu Jan 21 03:05:08 EST 2016
Sean Wang added the comment:
Sorry, missed one condition:
I used `unicode_literals` in Python 2.7.10, example below:
>>> from __future__ import unicode_literals
>>> str('api名称')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-4: ordinal not in range(128)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2931>
_______________________________________
More information about the Python-bugs-list
mailing list