mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
parent
b1d0e5b11e
commit
20b8d992b0
1 changed files with 2 additions and 2 deletions
|
|
@ -262,8 +262,8 @@ Unicode result). The following examples show the differences::
|
||||||
...
|
...
|
||||||
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0:
|
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0:
|
||||||
invalid start byte
|
invalid start byte
|
||||||
>>> b'\x80abc'.decode("utf-8", "replace") #doctest: +SKIP
|
>>> b'\x80abc'.decode("utf-8", "replace")
|
||||||
'?abc'
|
'\ufffdabc'
|
||||||
>>> b'\x80abc'.decode("utf-8", "ignore")
|
>>> b'\x80abc'.decode("utf-8", "ignore")
|
||||||
'abc'
|
'abc'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue