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 baikie
Recipients baikie, ezio.melotti, lemburg, loewis, vstinner
Date 2010-08-26.18:04:04
SpamBayes Score 1.3295921e-06
Marked as misclassified No
Message-id <>
In-reply-to <>
> The surrogateescape mechanism is a very hackish approach, and
> violates the principle that errors should never pass silently.

I don't see how a name resolution API returning non-ASCII bytes
would indicate an error.  If the host table contains a non-ASCII
byte sequence for a host, then that is the host's name - it works
just as well as an ASCII name, both forwards and backwards.

What is hackish is representing char * data as a Unicode string
when there is no native Unicode API to feed it to - there is no
issue here such as file names being bytes on Unix and Unicode on
Windows, so the clean thing to do would be to return a bytes
object.  I suggested the surrogateescape mechanism in order to
retain backwards compatibility.

> However, it solves a real problem - people do run into the problem
> with file names every day. With this problem, I'd say "if it hurts,
> don't do it, then".

But to be more explicit, that's like saying "if it hurts, get
your sysadmin to reconfigure the company network".
Date User Action Args
2010-08-26 18:04:08baikiesetrecipients: + baikie, lemburg, loewis, vstinner, ezio.melotti
2010-08-26 18:04:05baikielinkissue9377 messages
2010-08-26 18:04:04baikiecreate