Issue #20424: Python implementation of io.StringIO now supports lone surrogates.

This commit is contained in:
Serhiy Storchaka 2014-01-29 11:33:26 +02:00
parent 1e40295af6
commit c92ea76f3f
3 changed files with 12 additions and 1 deletions

View file

@ -2044,7 +2044,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.