Message175404
UnicodeDecodeError exception is reported for encode operation on strings.
This issue does not surface for the same operation on unicode string (UnicodeEncodeError exception is correctly reported).
---- string:
>>> 'AB\xff'.encode('ascii')
Traceback (most recent call last):
File "<pyshell#27>", line 1, in <module>
'AB\xff'.encode('ascii')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 2: ordinal not in range(128)
---- unicode string:
>>> u'AB\xff'.encode('ascii')
Traceback (most recent call last):
File "<pyshell#28>", line 1, in <module>
u'AB\xff'.encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xff' in position 2: ordinal not in range(128) |
|
Date |
User |
Action |
Args |
2012-11-11 22:51:36 | Wojtek.Szymilowski | set | recipients:
+ Wojtek.Szymilowski, ezio.melotti |
2012-11-11 22:51:36 | Wojtek.Szymilowski | set | messageid: <1352674296.04.0.101357421426.issue16456@psf.upfronthosting.co.za> |
2012-11-11 22:51:35 | Wojtek.Szymilowski | link | issue16456 messages |
2012-11-11 22:51:35 | Wojtek.Szymilowski | create | |
|