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

In zh.GBK locale, Locale.getDefault() return zh not zh_CN.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0
    • core-libs

      JDK Version: 1.2fcs-O
      OS: Solaris 2.7
      Locale: zh.GBK

      zh_CN is the locale name for PRC in JDK

      In recent builds of jdk1.2, in Solaris zh locale, Locale.getDefault() will
      return zh_CN which is consistent with Windows platform. But in Solaris 2.7
      zh.GBK locale, Locale.getDefault() will return zh not zh_CN, then many
      locale-senstive classes got wrong functions for JDK will look for some
      resource from zh not zh_CN.
      GBK and gb2312 is just two encodings for zh_CN (java) locale.
      while in solaris 2.7, we can use setenv LANG command to set the default
      encoding, such as: (zh_CN is the locale name for PRC in JDK)
      setenv LANG zh.GBK we will get GBK as the default encoding for zh_CN.
      setenv LANG zh we will get gb2312 as the default encoding for zh_CN


      jim.hu@prc 1998-10-23

            aliusunw Alan Liu (Inactive)
            jhusunw Jim Hu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: