Message165264
| Author |
rg3 |
| Recipients |
georg.brandl, groodt, loewis, r.david.murray, rg3 |
| Date |
2012年07月11日.16:45:38 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1342025139.16.0.0940746846594.issue5815@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I don't know if the behavior is considered a bug or just undocumented, but under Python 2.7.3 it's still the same. locale.getpreferredencoding() does return UTF-8, but the second element in the tuple locale.getdefaultlocale() is "utf_8_valencia", which is not a valid encoding despite the documentation saying it's supposed to be an encoding name.
From my terminal:
$ python -V
Python 2.7.3
$ LANG=ca_ES.UTF-8@valencia python -c 'import locale; print locale.getpreferredencoding()'
UTF-8
$ LANG=ca_ES.UTF-8@valencia python -c 'import locale; print locale.getdefaultlocale()'
('ca_ES', 'utf_8_valencia')
$ LANG=ca_ES.UTF-8 python -c 'import locale; print locale.getpreferredencoding()'
UTF-8
$ LANG=ca_ES.UTF-8 python -c 'import locale; print locale.getdefaultlocale()'
('ca_ES', 'UTF-8') |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年07月11日 16:45:39 | rg3 | set | recipients:
+ rg3, loewis, georg.brandl, r.david.murray, groodt |
| 2012年07月11日 16:45:39 | rg3 | set | messageid: <1342025139.16.0.0940746846594.issue5815@psf.upfronthosting.co.za> |
| 2012年07月11日 16:45:38 | rg3 | link | issue5815 messages |
| 2012年07月11日 16:45:38 | rg3 | create |
|