Message214515
| Author |
albertjan |
| Recipients |
albertjan, ned.deily, r.david.murray, ronaldoussoren |
| Date |
2014年03月22日.20:34:42 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1395520482.6.0.684188399682.issue20999@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Ok, I know this is closed as a duplicate, but I am pasting some additional info here for reference. All info is about the FIRST system of the original message
## The locale settings
fomcls-Mac-Pro:Desktop fomcl$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
## export LANG="en_US.UTF-8" does not fix it.
fomcls-Mac-Pro:Desktop fomcl$ export LANG="en_US.UTF-8"
fomcl-Mac-Pro:Desktop fomcl$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
>>> import locale
>>> locale.getdefaultlocale()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 496, in getdefaultlocale
return _parse_localename(localename)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 428, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
>>> locale.setlocale(locale.LC_ALL, "")
'en_US.UTF-8/UTF-8/en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/en_US.UTF-8'
>>> locale.getlocale()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 515, in getlocale
return _parse_localename(localename)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 428, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
## export LC_ALL="en_US.UTF-8" makes it all work as expected/desired.
fomcls-Mac-Pro:Desktop fomcl$ export LC_ALL="en_US.UTF-8"
fomcls-Mac-Pro:Desktop fomcl$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'UTF-8')
>>> locale.getlocale()
(None, None)
>>> locale.setlocale(locale.LC_ALL, "")
'en_US.UTF-8'
>>> locale.getlocale()
('en_US', 'UTF-8') |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年03月22日 20:34:42 | albertjan | set | recipients:
+ albertjan, ronaldoussoren, ned.deily, r.david.murray |
| 2014年03月22日 20:34:42 | albertjan | set | messageid: <1395520482.6.0.684188399682.issue20999@psf.upfronthosting.co.za> |
| 2014年03月22日 20:34:42 | albertjan | link | issue20999 messages |
| 2014年03月22日 20:34:42 | albertjan | create |
|