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

java.util.Locale.getISO3Language() works wrong for Tamil

XMLWordPrintable

    • beta
    • sparc
    • solaris_2.5



      Name: avC70361 Date: 09/23/98



        The java.util.Locale.getISO3Language() returns wrong result for a locale with language code 'ta'(Tamil).
      It returns 'tat' which is a three-letter code for Tatar(ta). The correct resalt(accordingly to the source
      provided in the comments to the bug 4147307 (http://www.triacom.com/archive/iso639-2.en.html)) is 'tam'
      (Tamil).

      Here is a test demonstrating the bug.
      ----------------GetISO3LanguageTest.java----------------
      import java.util.Locale;

      public class GetISO3LanguageTest {

        public static void main(String args[]) {
          Locale l = new Locale("ta", "");

          String code = l.getISO3Language();

          if (!code.equals("tam")) {
            System.out.println("locale '" + l + "': 3-letters code: '" + code + "', expected 3-letters code: 'tam'");
          } else {
            System.out.println("Passed.");
          }
        }
      }
      --------------The test output----------
      > java GetISO3LanguageTest
      locale 'ta': 3-letters code: 'tat', expected 3-letters code: 'tam'

      ======================================================================

            duke J. Duke
            ovlasov Oleksandr Vlasov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: