]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Emit valid floating point numbers, even when running under a Locale with
authorFinn Bock <bckfnn@apache.org>
Tue, 28 Sep 2004 11:04:31 +0000 (11:04 +0000)
committerFinn Bock <bckfnn@apache.org>
Tue, 28 Sep 2004 11:04:31 +0000 (11:04 +0000)
a decimal point different from '.'

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197981 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/ps/PSGenerator.java

index e69789cd988cb9e1f065f74e641fdaebd13af198..f7cf64c4b459d0042dcc8f1f6547cd2c7a7d9c87 100644 (file)
@@ -23,7 +23,9 @@ import java.io.OutputStream;
 import java.io.IOException;
 import java.text.DateFormat;
 import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
 import java.util.Date;
+import java.util.Locale;
 import java.util.Stack;
 
 /**
@@ -47,9 +49,9 @@ public class PSGenerator {
     
     private Stack graphicsStateStack = new Stack();
     private PSState currentState;
-    private DecimalFormat df3 = new DecimalFormat("0.000");
-    private DecimalFormat df1 = new DecimalFormat("0.#");
-    private DecimalFormat df5 = new DecimalFormat("0.#####");
+    private DecimalFormat df3 = new DecimalFormat("0.000", new DecimalFormatSymbols(Locale.US));
+    private DecimalFormat df1 = new DecimalFormat("0.#", new DecimalFormatSymbols(Locale.US));
+    private DecimalFormat df5 = new DecimalFormat("0.#####", new DecimalFormatSymbols(Locale.US));
 
     private StringBuffer tempBuffer = new StringBuffer(256);