mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Issue #8383: pickle and pickletools use surrogatepass error handler when
encoding unicode as utf8 to support lone surrogates and stay compatible with Python 2.x and 3.0
This commit is contained in:
parent
3606760670
commit
485fb56eb8
5 changed files with 14 additions and 6 deletions
|
@ -515,7 +515,9 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
|
||||
def test_unicode(self):
|
||||
endcases = ['', '<\\u>', '<\\\u1234>', '<\n>',
|
||||
'<\\>', '<\\\U00012345>']
|
||||
'<\\>', '<\\\U00012345>',
|
||||
# surrogates
|
||||
'<\udc80>']
|
||||
for proto in protocols:
|
||||
for u in endcases:
|
||||
p = self.dumps(u, proto)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue