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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: