Title: Unicode HOWTO references a question mark that isn't in snippet
Type: Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Quentin.Pradet, docs@python, martin.panter, python-dev
Priority: normal Keywords:

Created on 2016-01-27 17:15 by Quentin.Pradet, last changed 2016-01-28 04:18 by martin.panter. This issue is now closed.

Messages (3)
msg259034 - (view) Author: Quentin Pradet (Quentin.Pradet) * Date: 2016-01-27 17:15

> The following examples show the differences::
>     >>> b'\x80abc'.decode("utf-8", "strict")  #doctest: +NORMALIZE_WHITESPACE
>     Traceback (most recent call last):
>         ...
>     UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0:
>       invalid start byte
>     >>> b'\x80abc'.decode("utf-8", "replace")
>     '\ufffdabc'
>     >>> b'\x80abc'.decode("utf-8", "backslashreplace")
>     '\\x80abc'
>     >>> b'\x80abc'.decode("utf-8", "ignore")
>     'abc'
> (In this code example, the Unicode replacement character has been replaced by
> a question mark because it may not be displayed on some systems.)

I think the whole sentence after the snippet can be removed because this is exactly what Python 3.2+ outputs. It looks like the commit which added this sentence dates from Python 3.1:, but another commit around Python 3.3 removed it:
msg259090 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-01-28 04:13
New changeset 63c1c7cdad0f by Martin Panter in branch '3.5':
Issue #26220: Remove outdated comment about a question mark

New changeset dbf90175ea50 by Martin Panter in branch 'default':
Issue #26220: Merge Unicode how-to from 3.5
msg259091 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-01-28 04:18
Thanks for the report Quentin.
Date User Action Args
2016-01-28 04:18:43martin.pantersetstatus: open -> closed

versions: - Python 3.2, Python 3.3, Python 3.4
nosy: + martin.panter

messages: + msg259091
resolution: fixed
stage: resolved
2016-01-28 04:13:23python-devsetnosy: + python-dev
messages: + msg259090
2016-01-27 17:15:08Quentin.Pradetcreate