Rename the surrogates error handler to surrogatepass.

This commit is contained in:
Martin v. Löwis 2009-05-10 08:08:56 +00:00
parent cf7925dfc6
commit e0a2b72e61
6 changed files with 25 additions and 25 deletions

View file

@ -906,10 +906,10 @@ class UnicodeTest(
self.assertEqual('\u20ac'.encode('utf-8'), b'\xe2\x82\xac')
self.assertEqual('\ud800\udc02'.encode('utf-8'), b'\xf0\x90\x80\x82')
self.assertEqual('\ud84d\udc56'.encode('utf-8'), b'\xf0\xa3\x91\x96')
self.assertEqual('\ud800'.encode('utf-8', 'surrogates'), b'\xed\xa0\x80')
self.assertEqual('\udc00'.encode('utf-8', 'surrogates'), b'\xed\xb0\x80')
self.assertEqual('\ud800'.encode('utf-8', 'surrogatepass'), b'\xed\xa0\x80')
self.assertEqual('\udc00'.encode('utf-8', 'surrogatepass'), b'\xed\xb0\x80')
self.assertEqual(
('\ud800\udc02'*1000).encode('utf-8', 'surrogates'),
('\ud800\udc02'*1000).encode('utf-8', 'surrogatepass'),
b'\xf0\x90\x80\x82'*1000
)
self.assertEqual(