homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: locale._build_localename(locale.getdefaultlocale()) returns 'C.mac-roman'
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.0, Python 2.6, Python 2.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Obsolete default file encoding "mac-roman" on OS X, not influenced by locale env variables
View: 6202
Assigned To: Nosy List: jcsalterego, ned.deily, ronaldoussoren, sjt
Priority: normal Keywords:

Created on 2009年06月20日 08:03 by sjt, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (3)
msg89537 - (view) Author: Stephen J. Turnbull (sjt) * (Python triager) Date: 2009年06月20日 08:03
Which causes the locale machinery to spit exceptions, and the program to 
die, usually (eg, hg).
This manifests naturally on an Intel Mac, Mac OS X 10.5.7, but the 
problem behavior is in _build_localename. When called as
_build_localename((None,'any_string'))
it returns 'C.any_string'. I don't know of any system that supports 
anything but the POSIX portable character set in the C/POSIX locale, so
this is clearly wrong.
I suggest that when the first component of the argument is None, the
second component should be ignored.
Probably my Mac is misconfigured, but I think this is still a bug that 
should be fixed.
Observed in all of 2.5.4, 2.6.2, and 3.0.1 (vanilla MacPorts builds).
References: It's possible this is related to issue1699853, issue1176504, 
issue504219, but I don't think fixing this will help with those issues. 
It is not related to issue3067.
msg89672 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009年06月24日 18:56
This was probably fixed by the checkins for Issue6202.
$ python3.1
Python 3.1rc1+ (py3k, Jun 8 2009, 22:53:59) 
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale._build_localename(locale.getdefaultlocale())
'en_US.UTF8'
>>> 
$ python3.0
Python 3.0.1 (r301:69597, Feb 14 2009, 19:03:52) 
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale._build_localename(locale.getdefaultlocale())
'C.mac-roman'
>>>
msg89708 - (view) Author: Jerry Chen (jcsalterego) Date: 2009年06月25日 13:38
Also seeing this was resolved by Issue6202.
Python 3.1rc2+ (py3k:73552, Jun 24 2009, 23:11:23) 
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale._build_localename(locale.getdefaultlocale())
'en_US.UTF8'
Python 3.0.1+ (release30-maint:73553, Jun 25 2009, 08:35:35) 
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale._build_localename(locale.getdefaultlocale())
'C.mac-roman'
History
Date User Action Args
2022年04月11日 14:56:50adminsetgithub: 50564
2009年06月25日 13:48:42r.david.murraysetstatus: open -> closed
resolution: duplicate
superseder: Obsolete default file encoding "mac-roman" on OS X, not influenced by locale env variables
stage: resolved
2009年06月25日 13:38:36jcsalteregosetnosy: + jcsalterego
messages: + msg89708
2009年06月24日 18:57:00ned.deilysetnosy: + ronaldoussoren, ned.deily
messages: + msg89672
2009年06月20日 08:03:53sjtcreate

AltStyle によって変換されたページ (->オリジナル) /