Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 77989 invoked from network); 30 Jun 2006 06:10:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Jun 2006 06:10:12 -0000 Received: (qmail 87406 invoked by uid 500); 30 Jun 2006 06:10:12 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 87316 invoked by uid 500); 30 Jun 2006 06:10:11 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 87305 invoked by uid 99); 30 Jun 2006 06:10:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jun 2006 23:10:11 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jun 2006 23:10:08 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 359AE410005 for ; Fri, 30 Jun 2006 06:08:30 +0000 (GMT) Message-ID: <18600307.1151647710201.JavaMail.jira@brutus> Date: Fri, 30 Jun 2006 06:08:30 +0000 (GMT+00:00) From: "Vladimir Ivanov (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-663) [classlib][luni] compatibility: unexpected IllegalCharsetNameException for String.getBytes("illegal/name") In-Reply-To: <22335517.1151313389792.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-663?page=3Dcomments#acti= on_12418575 ]=20 Vladimir Ivanov commented on HARMONY-663: ----------------------------------------- verified, thanks > [classlib][luni] compatibility: unexpected IllegalCharsetNameException fo= r String.getBytes("illegal/name") > -------------------------------------------------------------------------= --------------------------------- > > Key: HARMONY-663 > URL: http://issues.apache.org/jira/browse/HARMONY-663 > Project: Harmony > Type: Bug > Components: Classlib > Reporter: Vladimir Ivanov > Assignee: Mikhail Loenko > Attachments: String.patch, StringTest.patch > > The Harmony method String.getBytes("illegal/name") throws IllegalCharsetN= ameException while RI throws UnsupportedEncodingException and the j2se spe= c says for the getBytes(String charsetName): > "Throws: UnsupportedEncodingException - If the named charset is not suppo= rted" > No notes about IllegalCharsetNameException. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D tes= t.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > import java.io.*; > public class test { > public static void main (String[] args) {=20 > try { > "any".getBytes("?Q?D??_??_6ffa?+vG?_?????"); > } catch (Exception e) {=20 > =09 e.printStackTrace(); > System.out.println("Result: " + e); > } =20 > } =20 > } > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > Output: > C:\tmp\tmp17>C:\jrockit-j2sdk1.4.2_04\bin\java.exe -showversion test > java version "1.4.2_04" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) > BEA WebLogic JRockit(TM) 1.4.2_04 JVM (build ari-31788-20040616-1132-win= -ia32, Native Threads, GC strategy: parallel) > java.io.UnsupportedEncodingException: ?Q?D??_??_6ffa?+vG?_?????=C2=A7 > at sun.io.Converters.getConverterClass(ILjava.lang.String;)Ljava.= lang.Class;(Converters.java:215) > at sun.io.Converters.newConverter(ILjava.lang.String;)Ljava.lang.= Object;(Converters.java:248) > at sun.io.CharToByteConverter.getConverter(Ljava.lang.String;)Lsu= n.io.CharToByteConverter;(CharToByteConverter.java:64) > at java.lang.StringCoding.getEncoder(Ljava.lang.String;Z)Ljava.la= ng.StringCoding$StringEncoder;(Unknown Source) > at java.lang.StringCoding.encode(Ljava.lang.String;[CII)[B(Unknow= n Source) > at java.lang.String.getBytes(Ljava.lang.String;)[B(Unknown Source= ) > at test.main([Ljava.lang.String;)V(test.java:6) > Result: java.io.UnsupportedEncodingException: ?Q?D??_??_6ffa?+vG?_?????= =C2=A7 > C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showversi= on test > java version 1.5 (subset) > (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,= as applicable. > java.nio.charset.IllegalCharsetNameException: The illegal charset name is= "?Q?D??_??_6ffa?+vG?_?????=C2=A7". > at java.nio.charset.Charset.checkCharsetName(Charset.java:242) > at java.nio.charset.Charset.forNameInternal(Charset.java:442) > at java.nio.charset.Charset.forName(Charset.java:513) > at java.lang.String.getCharset(String.java:850) > at java.lang.String.getBytes(String.java:838) > at test.main(test.java:6) > Result: java.nio.charset.IllegalCharsetNameException: The illegal charset= name is "?Q?D??_??_6ffa?+vG?_?????=C2=A7". > C:\tmp\tmp17> --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira