[issue7300] Unicode arguments in str.format()
STINNER Victor
report at bugs.python.org
Wed Mar 10 00:50:05 CET 2010
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
My patch converts the format string to unicode using the default encoding. It's inconsistent with str%args: str%args converts str to unicode using the ASCII charset (if a least one argument is an unicode string), not the default encoding.
>>> "\xff%s" % u'\xe9'
...
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7300>
_______________________________________
More information about the Python-bugs-list
mailing list