You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vladimir Beliaev (JIRA)" <ji...@apache.org> on 2007/12/19 11:24:43 UTC
[jira] Commented: (HARMONY-4196) [classlib][luni] InputStreamReader
can't handle UnicodeBig encoding
[ https://issues.apache.org/jira/browse/HARMONY-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553287 ]
Vladimir Beliaev commented on HARMONY-4196:
-------------------------------------------
The bug is still reproducible on M4 snapshot:
../harmony-jdk-603534/bin/java -showversion Test
Apache Harmony Launcher : (c) Copyright 1991, 2007 The Apache Software Foundation or its licensors, as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r603534, (Dec 13 2007), Windows/ia32/msvc 1310, release build
http://harmony.apache.org
FAIL:
java.io.UnsupportedEncodingException
at java.io.InputStreamReader.<init>(InputStreamReader.java:104)
at Test.main(Test.java:6)
Caused by: java.nio.charset.UnsupportedCharsetException: The unsupported charset name is "UnicodeBig".
at java.nio.charset.Charset.forName(Charset.java:516)
at java.io.InputStreamReader.<init>(InputStreamReader.java:99)
... 1 more
Thanks
Vladimir Beliaev
> [classlib][luni] InputStreamReader can't handle UnicodeBig encoding
> -------------------------------------------------------------------
>
> Key: HARMONY-4196
> URL: https://issues.apache.org/jira/browse/HARMONY-4196
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Vasily Zakharov
> Assignee: Alexei Zakharov
> Priority: Minor
> Attachments: Harmony-4196-InputStreamReader_diagnostics.patch
>
>
> Consider the following simple test:
> import java.io.*;
> public class Test {
> public static void main(String[] args) {
> try {
> new InputStreamReader(new ByteArrayInputStream(new byte[] {(byte) 0xFE, (byte) 0xFF}), "UnicodeBig");
> System.out.println("SUCCESS");
> } catch (Throwable e) {
> System.out.println("FAIL:");
> e.printStackTrace(System.out);
> }
> }
> }
> Output on RI:
> SUCCESS
> Output on Harmony (both DRL VM and IBM VM):
> FAIL:
> java.io.UnsupportedEncodingException
> at java.io.InputStreamReader.<init>(InputStreamReader.java:104)
> at Test.main(Test.java:6)
> Additional investigation shows that the cause for this exception is:
> java.nio.charset.UnsupportedCharsetException: The unsupported charset name is "UnicodeBig".
> at java.nio.charset.Charset.forName(Charset.java:564)
> at java.io.InputStreamReader.<init>(InputStreamReader.java:99)
> at Test.main(Test.java:5)
> Interesting point is, the direct call to Charset.forName("UnicodeBig") causes the same exception on RI also.
> So it seems the problem is not in Charset but in InputStreamReader itself.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.