mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Implement PEP 393.
This commit is contained in:
parent
48d49497c5
commit
d63a3b8beb
102 changed files with 8153 additions and 5431 deletions
|
@ -622,6 +622,10 @@ class UTF8Test(ReadTest):
|
|||
b"abc\xed\xa0\x80def")
|
||||
self.assertEqual(b"abc\xed\xa0\x80def".decode("utf-8", "surrogatepass"),
|
||||
"abc\ud800def")
|
||||
self.assertEqual("\U00010fff\uD800".encode("utf-8", "surrogatepass"),
|
||||
b"\xf0\x90\xbf\xbf\xed\xa0\x80")
|
||||
self.assertEqual(b"\xf0\x90\xbf\xbf\xed\xa0\x80".decode("utf-8", "surrogatepass"),
|
||||
"\U00010fff\uD800")
|
||||
self.assertTrue(codecs.lookup_error("surrogatepass"))
|
||||
|
||||
class UTF7Test(ReadTest):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue