Edgewall Software

Changes between Version 1 and Version 2 of UnicodeDecodeError


Ignore:
Timestamp:
Mar 2, 2007, 2:01:13 PM (17 years ago)
Author:
Christian Boos
Comment:

clarify first paragraph and make the "python interactive session" blocks narrower

Legend:

Unmodified
Added
Removed
Modified
  • UnicodeDecodeError

    v1 v2  
    11= What does this `UnicodeDecodeError` mean? =
    22
    3 This error means that an attempt to create an `unicode` object (i.e. the Python internal representation for a sequence of internationalized characters as defined by the Unicode standard) from a `str` object by "decoding" the sequence of bytes composing the later according to some conventional encoding, failed.
     3This error indicate a failed attempt to create an `unicode` object (i.e. the Python internal representation for a sequence of internationalized characters as defined by the Unicode standard) from a `str` object, by "decoding" the sequence of bytes of the latter according to some conventional encoding.
    44
    55In practice, this happens because the default conversion will make use of the default encoding, which usually is the ASCII encoding and as such, doesn't associate any meaning to the byte values higher than 127.
     
    1414Traceback (most recent call last):
    1515  File "<stdin>", line 1, in ?
    16 UnicodeDecodeError: 'ascii' codec can't decode byte 0xee in position 3: ordinal not in range(128)
     16UnicodeDecodeError: 'ascii' codec can't decode byte 0xee
     17                    in position 3: ordinal not in range(128)
    1718}}}
    1819
     
    2324Traceback (most recent call last):
    2425  File "<stdin>", line 1, in ?
    25 UnicodeDecodeError: 'ascii' codec can't decode byte 0xee in position 3: ordinal not in range(128)
     26UnicodeDecodeError: 'ascii' codec can't decode byte 0xee
     27                    in position 3: ordinal not in range(128)
    2628}}}
    2729
     
    3335Traceback (most recent call last):
    3436  File "<stdin>", line 1, in ?
    35 UnicodeDecodeError: 'ascii' codec can't decode byte 0xee in position 3: ordinal not in range(128)
     37UnicodeDecodeError: 'ascii' codec can't decode byte 0xee
     38                    in position 3: ordinal not in range(128)
    3639}}}
    3740