Message118709
Regarding fixing the issue at hand on Windows, I think Python should use the corresponding win32 API for getting the hostname: GetComputerNameEx().
It supports Unicode, so the encoding issue doesn't arise.
See http://msdn.microsoft.com/en-us/library/ms724301(v=VS.85).aspx for details.
This also solves the platform.uname() issue mentioned here, since the uname() emulation for Windows relies on socket.gethostname() to determine the node name.
FWIW: Glib C does the reverse...
The GNU C library implements gethostname() as a library function that calls
uname(2) and copies up to len bytes from the returned nodename field into
name. |
|
Date |
User |
Action |
Args |
2010-10-14 18:29:05 | lemburg | set | recipients:
+ lemburg, loewis, vstinner, baikie, ezio.melotti, jesterKing |
2010-10-14 18:29:05 | lemburg | set | messageid: <1287080945.04.0.827985557963.issue9377@psf.upfronthosting.co.za> |
2010-10-14 18:29:03 | lemburg | link | issue9377 messages |
2010-10-14 18:29:03 | lemburg | create | |
|