mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Don't test whether surrogate sequences round-trip in UTF-8. 2.2.2 candidate.
This commit is contained in:
parent
766e300eaa
commit
1ce4ae3268
1 changed files with 4 additions and 1 deletions
|
@ -695,7 +695,10 @@ for encoding in ('utf-8',
|
|||
verify(unicode(u.encode(encoding),encoding) == u)
|
||||
|
||||
# UTF-8 must be roundtrip safe for all UCS-2 code points
|
||||
u = u''.join(map(unichr, range(0x10000)))
|
||||
# This excludes surrogates: in the full range, there would be
|
||||
# a surrogate pair (\udbff\udc00), which gets converted back
|
||||
# to a non-BMP character (\U0010fc00)
|
||||
u = u''.join(map(unichr, range(0,0xd800)+range(0xe000,0x10000)))
|
||||
for encoding in ('utf-8',):
|
||||
verify(unicode(u.encode(encoding),encoding) == u)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue