From: P. <pi...@ir...> - 2006-05-05 21:20:15
|
[David Goodger] >What I'd like to know is, is there a reliable way to *know* (not >guess) the encoding of sys.argv? IOW, a way to know the shell's >encoding. Not reliably. One may have filenames with different encodings in the=20 same directory. The shell does not have an encoding per se. However, the LANGUAGE, LANG, LC_ALL or LC_CTYPE environment variables=20 can hint about user's preferences. But this is no guarantee that file=20 names comply with this preference. Maybe this could be used short of=20 knowing better, given a program expects the guess to be sometimes wrong. --=20 Fran=E7ois Pinard http://pinard.progiciels-bpi.ca |