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 Almad
Recipients Almad, amaury.forgeotdarc, baikie, ezio.melotti, jesterKing, lemburg, loewis, r.david.murray, spaun2002, vstinner
Date 2015-05-16.12:00:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1431777658.14.0.622939986647.issue9377@psf.upfronthosting.co.za>
In-reply-to
Content
I'd add that this bug is very practical and can render a lot of software unusable/noisy/confusing on Windows, including Django (I discovered this bug when mentoring on Django Girls].

The simple step to reproduce is to take any windows and set regional settings to non-English (I've used Czech). You can verify that using "import locale; locale.getpreferredencoding()", that should display something else ("cp1250" in my case).

Then, set "name" (= hostname, in Windows settings) of the computer to anything containing non-ascii character (like "Didejo-noťas").

As Windows apparently encodes the hostname using their default encoding, it fails with

```
  File "C:\Python34\lib\wsgiref\simple_server.py", line 50, in server_bind
    HTTPServer.server_bind(self)
  File "C:\Python34\lib\http\server.py", line 135, in server_bind
    self.server_name = socket.getfqdn(host)
  File "C:\Python34\lib\socket.py", line 463, in getfqdn
    hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9d in position 9: invalid
start byte
```
History
Date User Action Args
2015-05-16 12:00:58Almadsetrecipients: + Almad, lemburg, loewis, amaury.forgeotdarc, vstinner, baikie, ezio.melotti, r.david.murray, jesterKing, spaun2002
2015-05-16 12:00:58Almadsetmessageid: <1431777658.14.0.622939986647.issue9377@psf.upfronthosting.co.za>
2015-05-16 12:00:58Almadlinkissue9377 messages
2015-05-16 12:00:57Almadcreate