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 spaun2002
Recipients amaury.forgeotdarc, baikie, ezio.melotti, jesterKing, lemburg, loewis, r.david.murray, spaun2002, vstinner
Date 2012-04-12.10:08:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334225284.25.0.296500997066.issue9377@psf.upfronthosting.co.za>
In-reply-to
Content
I faced with the issue on my own PC. For a Russian version of WinOS default PC name is ИВАН-ПК (C8 C2 C0 CD 2D CF CA in hex) and it returns from gethostbyaddr (CRT) exactly in this form (encoded with system locale cp1251 not UTF8). So when the function PyUnicode_FromString is called, it expects that argument is utf8 encoded string and throws and error.
A lot of 3rd party modules use gethostbyaddr or getfqdn (which uses gethostbyaddr) and I can't just use function that returns names as bytes. Surrogate names are also not acceptable because the name mentioned above becomes ????-??
History
Date User Action Args
2012-04-12 10:08:04spaun2002setrecipients: + spaun2002, lemburg, loewis, amaury.forgeotdarc, vstinner, baikie, ezio.melotti, r.david.murray, jesterKing
2012-04-12 10:08:04spaun2002setmessageid: <1334225284.25.0.296500997066.issue9377@psf.upfronthosting.co.za>
2012-04-12 10:08:03spaun2002linkissue9377 messages
2012-04-12 10:08:03spaun2002create