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

Linux locale w/out country doesn't get picked up by J2RE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1
    • Resolution: Not an Issue
    • Affects Version/s: orion3, 1.3.1
    • Fix Version/s: None
    • Component/s: core-libs

      Description

      Platform: RedHat Linux 6.2 (x86) Distributed by RedHat,Inc (Ireland Limited)

      Environment: Gnome/KDE

      version number of Kernel: 2.2.14-6.1.1

      Locale: de (German)

      Installed version of JDK: j2sdk-1_3_1-beta-bin-b13-linux-i386-05_jan_2001.sh

      1. open a terminal "xterm", set the locale to ie: de or fr at the terminal.
         a. locale -a | more
         b. export LANG=de; export LC_ALL=de

      2. Problem: the locale not being able to get picked up by "java" program.
         Instead it still displays the default locale "en_US"

         The following is the program used to test the bug:

            import java.util.*;

      public class lo{

              public static void main(String args[]){

                      String s = " ";
                      String s2 = " ";

                      Locale de = Locale.getDefault();
                      s2 = de.getLanguage();
                      s = de.toString();

                      System.out.println(" " + s + " " + s2);
              }
      }



      wai.cheung@ireland 2001-01-18

        Attachments

          Activity

            People

            Assignee:
            naoto Naoto Sato
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: