mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #20424: Python implementation of io.StringIO now supports lone surrogates.
This commit is contained in:
commit
9f2e46de34
3 changed files with 12 additions and 1 deletions
|
@ -2052,7 +2052,7 @@ class StringIO(TextIOWrapper):
|
|||
def __init__(self, initial_value="", newline="\n"):
|
||||
super(StringIO, self).__init__(BytesIO(),
|
||||
encoding="utf-8",
|
||||
errors="strict",
|
||||
errors="surrogatepass",
|
||||
newline=newline)
|
||||
# Issue #5645: make universal newlines semantics the same as in the
|
||||
# C version, even under Windows.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue