Skip to content

Commit 0c5adf1

Browse files
committed
gh-133930: Name the replacement character in urllib.parse.unquote docs
1 parent 5131d72 commit 0c5adf1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎Doc/library/urllib.parse.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ task isn't already covered by the URL parsing functions above.
748748

749749
*encoding* defaults to ``'utf-8'``.
750750
*errors* defaults to ``'replace'``, meaning invalid sequences are replaced
751-
by a placeholder character.
751+
by ``�`` (U+FFFD, the official REPLACEMENT CHARACTER).
752752

753753
Example: ``unquote('/El%20Ni%C3%B1o/')`` yields ``'/El Niño/'``.
754754

‎Lib/urllib/parse.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ def unquote(string, encoding='utf-8', errors='replace'):
861861
sequences into Unicode characters, as accepted by the bytes.decode()
862862
method.
863863
By default, percent-encoded sequences are decoded with UTF-8, and invalid
864-
sequences are replaced by a placeholder character.
864+
sequences are replaced by U+FFFD (REPLACEMENT CHARACTER).
865865
866866
unquote('abc%20def') -> 'abc def'.
867867
"""

0 commit comments

Comments
 (0)