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

STINNER Victor report at bugs.python.org
Thu May 15 15:12:01 CEST 2014


STINNER Victor added the comment:

It makes sense to restrict surrogatepass to UTF-* encodings. UTF-8, UTF-16 and UTF-32 encoders reject surrogate characters, but not UTF-7. Is it a bug? I'm asking because PyCodec_SurrogatePassErrors() doesn't support UTF-7.

IMO your change is important enough to be mentionned in What's new Python 3.5 document, and maybe also in the documentation of the codecs module.

----------

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


More information about the Python-bugs-list mailing list