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

Locale not correctly determined and ResourceBundle loading messed up

XMLWordPrintable



      Name: rm29839 Date: 12/08/97


      This is a followup of a previous bug submission.

      When making Internationalized applications,
      with JDK1.1.4, if the -Duser.language= option
      is used on the java command line, the Locale
      was determined from this system property and
      program operation proceeded as expected.

      With JDK1.1.5, however, the System seems to
      disregard the options specified on the command
      line and install a default Locale determined from
      the user system environment.

      In my case, I'm writing a bilingual Japanese/English
      app in a Japanese environment, but despite
      putting -Duser.language=en as a command line
      argument, the default Locale returned from
      Local.getDefault() was ja_JP.

      To make matters worse, if I specify the language
      as english and the default appears to be
      japanese, when i load a ResourceBundle the
      japanese bundle is loaded but the labels
      and such are interpreted as english and i get
      a whole lot of garbage characters displayed
      instead of the japanese labels
      (i.e. 2 problems: wrong ResourceBundle was loaded,
      and ResourceBundle interpreted incorrectly)
      (Review ID: 21393)
      ======================================================================

            rgillamsunw Richard Gillam (Inactive)
            rmandelsunw Ronan Mandel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: