[Jython-checkins] jython: Fixed more non-english formatting trouble (similar to #1914).

frank.wierzbicki jython-checkins at python.org
Fri Jul 13 23:40:45 CEST 2012


http://hg.python.org/jython/rev/940d38d23c83
changeset:   6794:940d38d23c83
user:        Frank Wierzbicki <fwierzbicki at gmail.com>
date:        Fri Jul 13 14:40:20 2012 -0700
summary:
  Fixed more non-english formatting trouble (similar to #1914).

files:
  src/org/python/core/stringlib/Formatter.java |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/src/org/python/core/stringlib/Formatter.java b/src/org/python/core/stringlib/Formatter.java
--- a/src/org/python/core/stringlib/Formatter.java
+++ b/src/org/python/core/stringlib/Formatter.java
@@ -66,7 +66,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");
@@ -82,7 +82,7 @@
     static class PercentageFormatTemplate {
         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