What encoding is used when initializing sys.argv?

Petr Prikryl prikryl at skil.cz
Fri Sep 30 09:02:40 EDT 2005


Hi,

When solving the problem of passing the unicode
directory name through command line into a script
(MS Windows environment), I have discovered that
I do not understand what encoding should be used
to convert the sys.argv into unicode.

I know about the rejected attempt to implement
sys.argvu. Still, how the sys.argv is filled? What
encoding is used when parsing the cmd line internally?
To what encoding is it converted when non ASCII
characters appear?

Thanks for your time and experience,
  pepr


-- 
Petr Prikryl (prikrylp at skil dot cz)





More information about the Python-list mailing list