[issue23614] Opaque error message on UTF-8 decoding to surrogates

Chris Angelico report at bugs.python.org
Tue Apr 28 06:22:07 CEST 2015


Chris Angelico added the comment:

Got around to tracking down where this is actually being done. It's in Objects/stringlib/codecs.h and it looks to be a hot area for optimization. I don't want to fiddle with it without knowing a lot about the performance implications (UTF-8 encode/decode being a pretty common operation), and since my knowledge of CPU operation costs is about fifteen or twenty years out of date, it's probably best I not do this. It would be nice if the message could be improved per Ezio's suggestion, but that would mean returning more information to the caller.

----------

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


More information about the Python-bugs-list mailing list