main icon indicating copy to clipboard operation
main copied to clipboard

Return values from _locale.setlocale are different from CPython 2.4

Open ironpythonbot opened this issue 9 years ago • 0 comments

CPython:

> > > import _locale  
> > > def AreEqual(a, b):  
> > > ... if a!=b: raise "BAD"  
> > > ...  
> > > c_list = [ _locale.LC_ALL,  
> > > ... _locale.LC_COLLATE,  
> > > ... _locale.LC_CTYPE,  
> > > ... _locale.LC_MONETARY,  
> > > ... _locale.LC_NUMERIC,  
> > > ... _locale.LC_TIME,  
> > > ... ]  

for c in c_list:  
... _locale.setlocale(c,"en-us")  
... resultLocale = _locale.setlocale(c)  
... AreEqual(resultLocale,"English_United States.1252")  
...  
'English_United States.1252'  
'English_United States.1252'  
'English_United States.1252'  
'English_United States.1252'  
'English_United States.1252'  
'English_United States.1252'  
^Z  
IronPython:  
IronPython 1.1 (1.1) on .NET 2.0.50727.312  
Copyright (c) Microsoft Corporation. All rights reserved.  
import _locale  
def AreEqual(a, b):  
... if a!=b: raise "BAD"  
...  
c_list = [ _locale.LC_ALL,  
... _locale.LC_COLLATE,  
... _locale.LC_CTYPE,  
... _locale.LC_MONETARY,  
... _locale.LC_NUMERIC,  
... _locale.LC_TIME,  
... ]  

for c in c_list:  
... _locale.setlocale(c,"en-us")  
... resultLocale = _locale.setlocale(c)  
... AreEqual(resultLocale,"English_United States.1252")  
...  
Traceback (most recent call last):  
File , line 0, in <stdin>##11  
File , line 0, in AreEqual  
BAD  

resultLocale  
'en_US'  

Work Item Details

Original CodePlex Issue: Issue 9218 Status: Active Reason Closed: Unassigned Assigned to: Unassigned Reported on: Mar 29, 2007 at 2:07 AM Reported by: dfugate Updated on: Feb 22, 2013 at 2:16 AM Updated by: jdhardy

ironpythonbot avatar Dec 09 '14 16:12 ironpythonbot