Message95114
str.format() doesn't handle unicode arguments:
Python 2.6.4 (r264:75706, Oct 27 2009, 15:18:04)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> '{0}'.format(u'\u3042')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in
position 0: ordinal not in range(128)
Unicode arguments should be treated in the same way as the % operator
does it: by promoting the format string to unicode:
>>> '%s' % u'\u3042'
u'\u3042' |
|
Date |
User |
Action |
Args |
2009-11-10 13:57:35 | doerwalter | set | recipients:
+ doerwalter, eric.smith |
2009-11-10 13:57:35 | doerwalter | set | messageid: <1257861455.06.0.0846130484851.issue7300@psf.upfronthosting.co.za> |
2009-11-10 13:57:33 | doerwalter | link | issue7300 messages |
2009-11-10 13:57:33 | doerwalter | create | |
|