Edgewall Software

Changes between Version 3 and Version 4 of UnicodeEncodeError


Ignore:
Timestamp:
Jul 22, 2011, 4:30:58 PM (8 years ago)
Author:
Christian Boos
Comment:

#decode fix error message; don't remember with which version of Python I got the former error message, but all my current versions (2.4.4, 2.5.4, 2.6.5, 2.7.1) have that new message (or it was a copy/paste mistake in the first place)

Legend:

Unmodified
Added
Removed
Modified
  • UnicodeEncodeError

    v3 v4  
    4747>>> u'chaîne de caractères'.decode('utf-8')
    4848Traceback (most recent call last):
    49   File "<stdin>", line 1, in ?
    50 UnicodeDecodeError: 'ascii' codec can't decode byte 0xee
    51                     in position 3: ordinal not in range(128)
     49  File "<stdin>", line 1, in <module>
     50  File "C:\Dev\Python254\lib\encodings\utf_8.py", line 16, in decode
     51    return codecs.utf_8_decode(input, errors, True)
     52UnicodeEncodeError: 'ascii' codec can't encode character u'\xee' in position 3:
     53ordinal not in range(128)
    5254}}}
    5355