[Jython-checkins] jython: #1914 Float formatting broken in many non-English locales in Jython 2.7
frank.wierzbicki
jython-checkins at python.org
Fri Jul 13 20:08:44 CEST 2012
http://hg.python.org/jython/rev/32bdf218eb0f
changeset: 6792:32bdf218eb0f
user: Frank Wierzbicki <fwierzbicki at gmail.com>
date: Fri Jul 13 11:08:32 2012 -0700
summary:
#1914 Float formatting broken in many non-English locales in Jython 2.7
files:
NEWS | 1 +
src/org/python/core/PyString.java | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/NEWS b/NEWS
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@
Jython 2.7a3
Bugs Fixed
+ - [ 1914 ] Float formatting broken in many non-English locales in Jython 2.7
- [ 1909 ] attrgetter does not parse dotted attributes
- [ 1924 ] Implement operator.methodcaller
- [ 1934 ] Break itertools.compress into a separate class
diff --git a/src/org/python/core/PyString.java b/src/org/python/core/PyString.java
--- a/src/org/python/core/PyString.java
+++ b/src/org/python/core/PyString.java
@@ -2954,7 +2954,7 @@
static class DecimalFormatTemplate {
static DecimalFormat template;
static {
- template = new DecimalFormat("#,##0.#####");
+ template = new DecimalFormat("#,##0.#####", new DecimalFormatSymbols(java.util.Locale.US));
DecimalFormatSymbols symbols = template.getDecimalFormatSymbols();
symbols.setNaN("nan");
symbols.setInfinity("inf");
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list