Hi Ted, A point instead of a comma as decimal separator is perfectly ok in my eyes as it is also the default if you use toString(). I'd say it's also what people would expect here in Germany. I did some testing and I couldn't see a specific thousands separator, in which cases do I see it?
I ran the following tests and the only difference I saw was the comma when using %f for formatting the number. System.out.println(10000.987); System.out.println(String.format(Locale.GERMAN, "%f", 10000.987)); System.out.println(String.format(Locale.ENGLISH, "%f", 10000.987)); System.out.println(String.format(Locale.GERMAN, "%e", 10000.987)); System.out.println(String.format(Locale.ENGLISH, "%e", 10000.987)); System.out.println(String.format(Locale.GERMAN, "%g", 10000.987)); System.out.println(String.format(Locale.ENGLISH, "%g", 10000.987)); 10000.987 10000,987000 10000.987000 1.000099e+04 1.000099e+04 10001.0 10001.0 I'd be fine with having Locale.ENGLISH as default. --sebastian Am 19.08.2010 17:34, schrieb Ted Dunning: > Sebastian, Olivier, Isabel, I will need your input at the end of this email > as non- > English users of Mahout. > > Sean, > > On Wed, Aug 18, 2010 at 3:38 PM, Sean Owen <[email protected]> wrote: > > >> I think we might be battling inadvertently in SVN -- I think you undid >> my last change and a bit more. Not a problem per se but let's discuss >> what the thing to do is. >> >> > Thanks for popping up. The other issue was fat-fingering on my part due > to inexperience with git connected to svn. > > We do have a bit of a disagreement, however. I think we can resolve it > easily. > > > >> I think the output of the jobs ought to not depend on the Locale. >> While it may be "internally consistent" to use the system default >> Locale in all instances, since input and output will match for one >> user, it means that it won't match when two users trade data and are >> using different Locales. >> > > I agree half of the time. > > The output of the system as intended to be consumed by machines should be, > as you say, invariant across locale changes. > > On the other hand, output of the system as intended to be consumed by humans > should be locale specific. > > I went a bit overboard in the name of consistency and made some *log* > >> statements fixed at Locale.ENGLISH for consistency (and removed use of >> String.format() where it didn't do anything beyond what Logger does). >> That I don't mind un-doing. >> >> > Log statements are kind of borderline to me. They are often read by humans > and by machines. I would lean, barely, toward the machine, invariant style > here. > > Sebastian, Olivier and Isabel, > > What do you think about programs that display data for you in the wrong > locale, > especially with regard to decimal point and thousands separators? > > Does it cause you to make errors in interpreting the data? Or does it > happen > so often that you correct what you read without noticing? > >
