[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: >> If the mere existence of the fsname encoding leads to that much >> confusion, I think I also support its removal. > > Well, the fsname encoding has a hardwired value under OS X (regardless > of the locale), which kind of justifies its existence, no? Perhap

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > -1. Environment variables are typically set in a text editor or on > the command line, so they will typically have the locale's encoding. Fair enough. > If the mere existence of the fsname encoding leads to that much > confusion, I think I also support its r

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: > The most likely values to be non-ASCII are, therefore, file paths. So it > would make sense to also use the filesystem encoding for environment > variables (so as to satisfy the common case). -1. Environment variables are typically set in a text editor or on

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Antoine: Python cannot possibly know whether a command line argument > is meant as a file name or as some other text, and what encoding the > receiving application will apply to it (if any). I understand. But practicality seems to suggest that, most of the ti

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: Antoine: Python cannot possibly know whether a command line argument is meant as a file name or as some other text, and what encoding the receiving application will apply to it (if any). I agree it's best to have all "IO" encodings being the same in Python,

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The important point is that we have to use the same encoding to decode > and encode command line arguments. I don't think I agree with this. It's only important when you run a Python interpreter using subprocess, but the point of using subprocess is to run

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-08 Thread Stephen Hansen
Stephen Hansen added the comment: This issue seems to be the cause of issue4388 -- and cmdline_encoding-2.patch fixes it, fwiw. -- nosy: +ixokai ___ Python tracker ___ _

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-02 Thread STINNER Victor
STINNER Victor added the comment: See also #10014: sys.path[0] is decoded from the locale encoding instead of the fileystem encoding. -- ___ Python tracker ___ _

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-09-30 Thread STINNER Victor
STINNER Victor added the comment: > A system where the filesystem encoding doesn't match the locale > encoding is hard to get right. Mmmh. The problem is maybe that the new PYTHONFSENCODING environment variable (added by #8622) introduced an horrible inconstency between Python and other appli

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-09-30 Thread STINNER Victor
STINNER Victor added the comment: Extract of an interesting message (msg111432) of #8775 (issue specific to Mac OS X): << A system where the filesystem encoding doesn't match the locale encoding is hard to get right. While it would be possible to add sys.cmdlineencoding that doesn't actually

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-09-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> The problem with command line arguments is that they don't necessarily >> have just one encoding (just like env vars may well use more than >> one encoding) on Unix platforms. > > The issue

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-09-30 Thread STINNER Victor
STINNER Victor added the comment: > The problem with command line arguments is that they don't necessarily > have just one encoding (just like env vars may well use more than > one encoding) on Unix platforms. The issue #8776 proposes the creation of sys.argv. > When using path and file names