Message158118
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 ????-?? |
|
Date |
User |
Action |
Args |
2012-04-12 10:08:04 | spaun2002 | set | recipients:
+ spaun2002, lemburg, loewis, amaury.forgeotdarc, vstinner, baikie, ezio.melotti, r.david.murray, jesterKing |
2012-04-12 10:08:04 | spaun2002 | set | messageid: <1334225284.25.0.296500997066.issue9377@psf.upfronthosting.co.za> |
2012-04-12 10:08:03 | spaun2002 | link | issue9377 messages |
2012-04-12 10:08:03 | spaun2002 | create | |
|