This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients abarry, eryksun, ezio.melotti, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2016-01-28.08:48:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453970907.7.0.802122810462.issue26227@psf.upfronthosting.co.za>
In-reply-to
Content
> The patch is missing the "errors" parameter of PyUnicode_DecodeLocale.

Woops, I shouldn't write patch in the middle of the night :-) Hopefully, I didn't push it :-) PyUnicode_DecodeLocale() should only be used when the encoding depends on the *currenet* value of LC_CTYPE.

Here, the ANSI code page is fine, and so PyUnicode_DecodeFSDefault() should be used instead.

> socket_getnameinfo also decodes as UTF-8

Hum, let met try a new patch. It decodes hostname from the ANSI code page on Windows for:

* socket.getnameinfo()
* socket.gethostbyaddr()
* socket.gethostbyname_ex()

The behaviour on other platforms is unchanged.
History
Date User Action Args
2016-01-28 08:48:27vstinnersetrecipients: + vstinner, paul.moore, tim.golden, ezio.melotti, zach.ware, eryksun, steve.dower, abarry
2016-01-28 08:48:27vstinnersetmessageid: <1453970907.7.0.802122810462.issue26227@psf.upfronthosting.co.za>
2016-01-28 08:48:27vstinnerlinkissue26227 messages
2016-01-28 08:48:27vstinnercreate