[Patches] [ python-Patches-798145 ] nl_langinfo(RADIXCHAR) wrong
SourceForge.net
noreply at sourceforge.net
Sun Aug 31 08:12:36 EDT 2003
Patches item #798145, was opened at 2003-08-31 09:12
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=798145&group_id=5470
Category: Modules
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeff Epler (jepler)
Assigned to: Nobody/Anonymous (nobody)
Summary: nl_langinfo(RADIXCHAR) wrong
Initial Comment:
See
http://google.com/groups?as_umsgid=m3d6empnsq.fsf%40mira.informatik.hu-berlin.de
The following code prints RADIXCHAR from the C locale, not from the chosen locale (fr_FR and many other european locales should give ','
from locale import setlocale, LC_NUMERIC, nl_langinfo, RADIXCHAR
setlocale(LC_NUMERIC, "fr_FR")
print nl_langinfo(RADIXCHAR)
The patch assumes that the value nl_langinfo() should give for RADIXCHAR and THOUSEP are the same as localeconv()['decimal_point'] and ['thousands_sep']. It assumes that if RADIXCHAR is defined then THOUSEP is (just as above code does),
How can I write a test for this? Presumably many platforms (Windows?) won't provide a complete set of locales.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=798145&group_id=5470
More information about the Patches
mailing list