Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Locale.getDefault bug in JDK 1.7 Date: Mon, 22 Aug 2011 11:22:06 -0700 (PDT) Organization: http://groups.google.com Lines: 34 Message-ID: References: Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 2620:0:1000:437c:224:d7ff:fe69:5838 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1314037428 8378 127.0.0.1 (22 Aug 2011 18:23:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 22 Aug 2011 18:23:48 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2620:0:1000:437c:224:d7ff:fe69:5838; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7300 markspace wrote: > Roedy Green wrote: >> I noticed that Locale.getDefault is returning the wrong locale in JDK >> 1.7. It used to work fine. It is not returning USA even though my OS >> is configured as Canada. [context restoration] >> D E F A U L T >> display:English (United States) >> country:US >> ISO3:USA >> display country:United States >> language:en >> display language:English ... >=20 > I'm confused. It is *NOT* returning USA? Even though your OS is set to = CA? >=20 > What do you expect it to return? Roedy's output shows that the locale default is US. However, it doesn't sh= ow how he thinks the OS is set to CA; presumably it's set in his BIOS or ot= her low-level. I'd like to see Roedy's program expanded to show the result= s of 'getDefault()' after a 'setDefault()' to Canada. I'd also like to see= the values of the OS's LANG and LANGUAGE envars, or equivalents. Finally,= I'd like to see what Java has for the user.language, user.country, and use= r.variant system properties. --=20 Lew