Message165264
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') |
|
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 | |
|