Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7149196

Locale.getDefault() return not correct locale

    XMLWordPrintable

    Details

      Description

      FULL PRODUCT VERSION :
      Java SE7u3
      java version "1.7.0_03"
      Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
      Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Locale Turkish

      A DESCRIPTION OF THE PROBLEM :
      When i change system locale to en_US Locale.getDefault() return tr_TR. At java document Locale class The Java Virtual Machine sets the default locale during startup based on the host environment. Java6 return correct locale. There is snapshot of System.getProperties() output for java6 and locale Turkish:

      user.country=TR, user.language=tr, user.variant=,

      output for java6 and locale Turkish:

      user.country=US, user.language=en, user.variant=,

      output for java7 and locale Turkish:

      user.country=TR, user.script=, user.variant=, user.language=tr

      output for java7 and locale English:

      user.country.format=US, user.country=TR, user.script=, user.variant=, user.language=tr, user.language.format=en

      So user.country=TR, user.language=tr must change to ser.country=US, user.script=, user.variant=, user.language=us but it's fails.






      REGRESSION. Last worked in version 7


      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Activity

            People

            Assignee:
            naoto Naoto Sato
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: