[issue13916] disallow the "surrogatepass" handler for non utf-* encodings

Serhiy Storchaka report at bugs.python.org
Thu May 15 17:11:49 CEST 2014


Serhiy Storchaka added the comment:

Here is a patch, which adds support for cp65001 and fixes test_cp1252. Please test it on Windows Vista.

Lone surrogates are not illegal in UTF-7 (see RFC 1642), so error handler is not called and explicit support of UTF-7 is not needed.

Could you please help with documenting this change in What's new Python 3.5 document? I don't think this change is worth special mentioning in codecs documentation, it is already documented that surrogatepass is supported only for utf-8, utf-16* and utf-32*.

----------
Added file: http://bugs.python.org/file35259/surrogatepass_cp_utf8.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13916>
_______________________________________


More information about the Python-bugs-list mailing list