harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-3946) [classlib][luni] java.util.Locale.getISO3Language() returns incorrect value for Locale("ga"), Locale("gd"), Locale("jw")
Date Sat, 06 Sep 2008 19:47:44 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tim Ellison closed HARMONY-3946.
--------------------------------

    Resolution: Cannot Reproduce
      Assignee: Tim Ellison

Looks like it has been fixed as per Jim's comments.

Please reopen if it is still an issue.


> [classlib][luni] java.util.Locale.getISO3Language() returns incorrect value for Locale("ga"),
Locale("gd"), Locale("jw")
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3946
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3946
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Elena Sayapina
>            Assignee: Tim Ellison
>            Priority: Minor
>
> java.util.Locale.getISO3Language() returns incorrect value for Locale("ga"), Locale("gd"),
Locale("jw")
> According to Java 1.5.0 API Spes: 
> "public String getISO3Language() throws MissingResourceException
> Returns a three-letter abbreviation for this locale's language. If the locale doesn't
specify a language, this will be the empty string. Otherwise, this will be a lowercase ISO
639-2/T language code. The ISO 639-2 language codes can be found on-line at http://www.loc.gov/standards/iso639-2/englangn.html
..." 
> According to the document from link above:
> "ga" is Irish language and its ISO 639-2 Code is "gle" 
> "gd" is Scottish Gaelic and its ISO 639-2 Code is "gla"
> "jw", is deprecated as noted in http://www.loc.gov/standards/iso639-2/php/code_changes.php,
"jv" is used instead  
> But Harmony returns different values. 
> It seems that Harmony uses some obsolete data for language codes, 
> like listed, for example here: http://www.w3.org/WAI/ER/IG/ert/iso639.htm 
> Simple test case to reproduce the bug:
> import java.util.Locale;
> public class langTest {
>     public static void main(String[] args) {
> 		
>         Locale l = new Locale("ga");
> 	  System.out.println("ga " + l.getISO3Language() + " : " + l.getDisplayLanguage());
> 		
> 	  l = new Locale("gd");
> 	  System.out.println("gd " + l.getISO3Language() + " : " + l.getDisplayLanguage());
> 		
> 	  try {
> 		l = new Locale("jw");
> 		System.out.println("jw " + l.getISO3Language() + " : " + l.getDisplayLanguage());
> 	} catch (Exception e) {
> 		System.out.println("jw: " + e);
> 	}
>    }
> }
> Output on Harmony-r540035:
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or
its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r540035, (May 21 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> ga gai : Irish
> gd gdh : Scots Gaelic
> jw jaw : Javanese
> Output on RI:
> java version "1.5.0_11"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)
> ga gle : Irish
> gd gla : Scottish Gaelic
> jw: java.util.MissingResourceException: Couldn't find 3-letter language code for jw

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message