summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-06-27 06:28:56 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-06-27 06:28:56 (GMT)
commitce9b5a55e164f1128756478b6a2bb548abec1980 (patch)
tree0b616e0fae5ec7204f723235d196ae2b7c124d78 /Lib/test/test_unicode.py
parent236d8b79748fec890d57ad0dd99ea3f1c3ba57df (diff)
downloadcpython-ce9b5a55e164f1128756478b6a2bb548abec1980.zip
cpython-ce9b5a55e164f1128756478b6a2bb548abec1980.tar.gz
cpython-ce9b5a55e164f1128756478b6a2bb548abec1980.tar.bz2
Encode surrogates in UTF-8 even for a wide Py_UNICODE.
Implement sys.maxunicode. Explicitly wrap around upper/lower computations for wide Py_UNICODE. When decoding large characters with UTF-8, represent expected test results using the \U notation.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index c82ac69..c9732d6 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -386,9 +386,9 @@ verify(u'\ud84d\udc56'.encode('utf-8') == \
''.join((chr(0xf0), chr(0xa3), chr(0x91), chr(0x96))) )
# UTF-8 specific decoding tests
verify(unicode(''.join((chr(0xf0), chr(0xa3), chr(0x91), chr(0x96))),
- 'utf-8') == u'\ud84d\udc56' )
+ 'utf-8') == u'\U00023456' )
verify(unicode(''.join((chr(0xf0), chr(0x90), chr(0x80), chr(0x82))),
- 'utf-8') == u'\ud800\udc02' )
+ 'utf-8') == u'\U00010002' )
verify(unicode(''.join((chr(0xe2), chr(0x82), chr(0xac))),
'utf-8') == u'\u20ac' )