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

Azeri locale detection and locale data support is missing

    XMLWordPrintable

Details

    Description

      J2SE v1.3.1_13 lacks support for detection of the Azeri locale and its related locale sensitive operations (formatting, language and country display names, month/day names and abbreviations, etc).

      This bug can be reproduced by setting the Windows 2K/XP platform locale to Azeri(Latin) or Azeri(Cyrillic), and then running a Java applet or application that calls a method on the Locale class (e.g., getLanguage, getCountry, toString, etc) or any locale-sensitive classes such as NumberFormat, DateFormat, etc. For example, with the platform locale set to Azeri, the following code using the Locale class:

          Locale loc = Locale.getDefault();
          g.drawString(loc.getLanguage());
          g.drawString(loc.getCountry());
          g.drawString(loc.toString());

      displays 'en', 'US', and 'en_US' instead of 'az', 'AZ', and 'az_AZ' for the language, country, and toString, respectively.

      We believe the Azeri support can be fixed with two modifications:

      First, for locale detection, the src/win32/native/common/locale_str.h needs to have the following modification -- two entries to langIDMap[]:

        0x042c, "az_AZ", /* Azeri_Latin */
        ...
        0x082c, "az_AZ", /* Azeri_Cyrillic */

      As a note, J2SE versions 1.4.0 and 1.4.1 already contains these mappings. To leverage that code for use in 1.3.X, see the 1.4.0 or 1.4.1 src/windows/native/common/locale_str.h file.

      Second, for locale data support, the LocaleElements_az.java, LocaleElements_az_AZ.java and DateFormatZoneData_az.java will need to be added to the J2SE. Our firm has already gathered locale data for Azeri and created these three files. These files (or their data) can be supplied to Sun upon request.
      ###@###.### 10/20/04 22:47 GMT

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mmma Marvin Ma (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: