[Python-Dev] Low-Level Encoding Behavior on Python 3
Armin Ronacher
armin.ronacher at active-4.com
Wed Mar 16 16:57:23 CET 2011
Hi,
On 3/16/11 3:48 AM, Antoine Pitrou wrote:
> I may be mistaken, but you seem to conflate two things: encoding of
> file names, and encoding of file contents. I guess that virtualenv
> chokes on the file contents, but most of your argument seems related to
> encoding of file names (aka "filesystem encoding").
These are two pretty unrelated problems but both are problems
nonetheless. The filename encoding should not be guessed from the
environment variables as those are from the connecting client. The
default encoding for file contents also should not be platform
dependent. It *will* lead to people thinking it works when in practice
it will break if they move their code to a remote server and SSH into it
and then trigger the code execution.
I argue that the first is just wrong (filename encoding guessing) and
the latter is dangerous (file content encoding being platform dependent).
virtualenv itself is already fixed and explicitly tells it to read with
UTF-8 encoding.
Regards,
Armin
More information about the Python-Dev
mailing list