Message131329
| Author |
vstinner |
| Recipients |
aronacher, loewis, vstinner |
| Date |
2011年03月18日.13:04:55 |
| SpamBayes Score |
0.0007419571 |
| Marked as misclassified |
No |
| Message-id |
<1300453496.02.0.907195897002.issue11574@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
TextIOWrapper is mostly based on locale.getpreferredencoding(), so msg131290 is still valid: if no env var is set, nl_langinfo() gives 'ASCII' (or something like that). But it is not easy to detect that env vars are not set.
I would prefer a completly different approach: always use UTF-8 by default if the encoding is not set.
Something like:
def open(filename, ..., encoding='UTF-8', ...)
TextIOWrapper.__init__(..., encoding='UTF-8', ...)
So not rely on locales anymore. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年03月18日 13:04:56 | vstinner | set | recipients:
+ vstinner, loewis, aronacher |
| 2011年03月18日 13:04:56 | vstinner | set | messageid: <1300453496.02.0.907195897002.issue11574@psf.upfronthosting.co.za> |
| 2011年03月18日 13:04:55 | vstinner | link | issue11574 messages |
| 2011年03月18日 13:04:55 | vstinner | create |
|