[issue26226] Various test suite failures on Windows
STINNER Victor
report at bugs.python.org
Wed Jan 27 20:10:15 EST 2016
STINNER Victor added the comment:
Python 2.7.11:
>>> import socket
>>> socket.gethostname()
'\xc9manuel-PC'
This one works on Python 3 because the Python function is implemented with a call to the Windows native API.
>>> socket.gethostbyaddr(socket.gethostname())
('\xc9manuel-PC.home', [], ['fe80::c9b7:5117:eea4:a104'])
This one fails on Python 3 because it uses the gethostbyaddr() C function and then decodes the hostname from UTF-8, whereas the hostname looks more to be encoded to ISO 8859-1 or something like that. IMHO it should be decoded from the ANSI code page.
I opened the issue #26227 to track this bug.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26226>
_______________________________________
More information about the Python-bugs-list
mailing list