You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Jim Yu (JIRA)" <ji...@apache.org> on 2008/09/05 11:45:44 UTC

[jira] Commented: (HARMONY-3946) [classlib][luni] java.util.Locale.getISO3Language() returns incorrect value for Locale("ga"), Locale("gd"), Locale("jw")

    [ https://issues.apache.org/jira/browse/HARMONY-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628602#action_12628602 ] 

Jim Yu commented on HARMONY-3946:
---------------------------------

Output on Harmony-r689392 is:
ga gle : Irish
gd gla : Scottish Gaelic
jw jaw : Javanese
It seems the output is correct now. Could somebody update the status for this 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
>            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.