10.01.14 14:19, M.-A. Lemburg написав(ла):
BTW: Perhaps it would be a good idea to backport the surrogateescape error handler to Python 2.7 to simplify writing code which works in both Python 2 and 3.
You also should change the UTF-8 codec so that it will reject surrogates (i.e. u'\ud880'.encode('utf-8') and '\xed\xa2\x80'.decode('utf-8') should raise exceptions). And this will break much code.
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com