[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

Steve Dower report at bugs.python.org
Fri Mar 13 14:28:19 EDT 2020


Steve Dower <steve.dower at python.org> added the comment:

I think PyUnicode_DecodeMBCS(name, strlen(name), "surrogatepass") captures the intention better, and is less likely to break in the future (apart from all the ways it's currently broken :) )

You should be right about the workaround too.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26227>
_______________________________________


More information about the Python-bugs-list mailing list