Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 95944 invoked from network); 6 Feb 2007 10:27:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Feb 2007 10:27:28 -0000 Received: (qmail 25129 invoked by uid 500); 6 Feb 2007 10:27:35 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 25107 invoked by uid 500); 6 Feb 2007 10:27:35 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 25098 invoked by uid 99); 6 Feb 2007 10:27:35 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Feb 2007 02:27:35 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Feb 2007 02:27:26 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D42387142BF for ; Tue, 6 Feb 2007 02:27:05 -0800 (PST) Message-ID: <32166252.1170757625866.JavaMail.jira@brutus> Date: Tue, 6 Feb 2007 02:27:05 -0800 (PST) From: "Tony Wu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-1360) [classlib][nio charset] Charset.forName() returns different value vs Charset.availableCharsets() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470509 ] Tony Wu commented on HARMONY-1360: ---------------------------------- This is a bug of ICU, I have reported it to ICU bug db, http://bugs.icu-project.org/trac/ticket/5580 > [classlib][nio charset] Charset.forName() returns different value vs Charset.availableCharsets() > ------------------------------------------------------------------------------------------------- > > Key: HARMONY-1360 > URL: https://issues.apache.org/jira/browse/HARMONY-1360 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Vladimir Ivanov > Attachments: CharsetTest.patch > > > The spec says for the method Charset.availableCharsets(): "In the absence of such changes (dynamically load of new charset providers), the charsets returned by this method are exactly those that can be retrieved via the forName method. > It works on RI but fails on Harmony. > ================= test.java ======================= > import java.util.SortedMap; > import java.nio.charset.Charset; > public class test { > public static void main(String args[]) { > SortedMap allCharsets = Charset.availableCharsets(); > Object[] names = allCharsets.keySet().toArray(); > for (int i = 0; i < names.length; ++i){ > Charset _chset = (Charset) allCharsets.get(names[i]); > Charset chset = Charset.forName((String) names[i]); > if (!chset.name().equals(_chset.name())){ > System.out.println("forName(" + names[i] + ") returned '" + > chset + "', instead of '" + _chset + "'"); > } > } > System.out.println("END"); > } > } > =============================================== > Output: > C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -cp . -showversion test > java version "1.5.0" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) > BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) > END > C:\tmp\tmp17>C:\harmony\classlib1.5\deploy\jdk\jre\bin\java.exe -cp . -showversion test > java version 1.5 (subset) > (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. > forName(KSC_5601) returned 'Charset[EUC-KR]', instead of 'Charset[KSC_5601]' > END -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.