I am trying to run clojure on windows 7 with this java version: java version "1.7.0_05" Java(TM) SE Runtime Environment (build 1.7.0_05-b05) Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
The decimal separator used to be a dot but for some reason it changed to a comma recently. I didn't change any OS locale settings. On Sunday, March 10, 2013 1:27:49 AM UTC, Andy Fingerhut wrote: > > What OS and version of Java are you using (output of "java -version", and > if on Linux "lsb_release -a" and "uname -a"). > > Are you doing these commands one after another in a single REPL session? > If so, how did you start that REPL? > > I've tried the commands you mention on these OS and JDK combos with > Clojure 1.4.0, and always saw "0.5" as the result, never "0,5". My default > locale was also en_US on all of these systems. > > Mac OS X 10.6.8 + java version 1.6.0_43 (Oracle/Apple) > Ubuntu 11.10 with Linux kernel 3.0.0-31-generic + java version 1.6.0_27 > (OpenJDK) > Windows 7 + java version 1.7.0_07 (Oracle) > > Andy > > On Mar 9, 2013, at 4:39 PM, dabd wrote: > > On my system I have: > > > *clojure-version* > {:major 1, :minor 4, :incremental 0, :qualifier nil} > > > (java.util.Locale/getDefault) > #<Locale en_US> > > > > (format "%.1f" 0.5) > "0,5" > > > (java.lang.String/format (java.util.Locale/getDefault) "%.1f" (to-array > [0.5])) > "0.5" > > but > > > (java.lang.String/format "%.1f" (to-array [0.5])) > "0,5" > > How can I set clojure.core/format to display numbers with a dot decimal > separator? > Why calling java.lang.String/format with the default locale returns a > different value than calling it without specifying the locale (javadoc says > it uses the default locale so they should return the same value)? > > Thanks. > > > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clo...@googlegroups.com <javascript:> > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+u...@googlegroups.com <javascript:> > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+u...@googlegroups.com <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.