Message118271
| Author |
vstinner |
| Recipients |
ixokai, lemburg, loewis, pitrou, pjenvey, ronaldoussoren, vstinner |
| Date |
2010年10月09日.12:28:17 |
| SpamBayes Score |
8.08692e-05 |
| Marked as misclassified |
No |
| Message-id |
<201010091428.08437.victor.stinner@haypocalc.com> |
| In-reply-to |
<1286615690.16.0.96067019245.issue9992@psf.upfronthosting.co.za> |
| Content |
> So perhaps it would be best if Python had two external default encodings:
> the IO one (command line arguments, environment variables, text files),
> and the file name encoding (defaulting to the IO encoding if not set)
Hum, I prefer to consider the FS encoding as an *internal* encoding. ... But
it's not completly true: it is used for the environment variables.
Let's consider that FS encoding is only an internal encoding. Wee need 3
encodings:
- FS encoding: any operation on the filesystem
- IO encoding: text file contents (included stdin, stdout, stderr which are
text files)
- a 3rd encoding (let's call it the "command line encoding"): used for the
command line arguments and the environment variables
For technical reasons ("bootstrap": Python initialization issues), I would
like that the 3rd encoding is set using the locale encoding. The user can only
control it using the classical locale variables (LC_ALL, LC_CTYPE, LANG). |
|