> Gunter D'Hondt wrote:
> > I've also tried a plain java program and call it like this:
> > java -Duser.language=fr  -Duser.country=FR  -Duser.variant=FR Main
> >
> > java program:
> > public class Main {
> >
> >     public static void main(String[] args) {
> >
> >         double d=123.45;
> >         System.out.println("d="+d);
> >     }
> > }
> >
> > as you say this would output "d=123,45" but it always
> outputs "d=123.45"

> From: John L. Webber

> Have you tried using javax.swing.text.NumberFormatter?

I think John is right. You may have the Locale installed but not be using
it. System.out.println just ends up calling Double.toString(d) which is
really a canonical serialization of a double, not a locale-specific
rendering.
http://java.sun.com/j2se/1.3/docs/api/java/lang/Double.html#toString(double)

Con


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to