harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4196) [classlib][luni] InputStreamReader can't handle UnicodeBig encoding
Date Sun, 17 Jun 2007 03:43:26 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505573

Vasily Zakharov commented on HARMONY-4196:

To get this root cause mentioned above I had to patch InputStreamReader, and I think this
small patch is good to be applied permanently, as it improves the diagnostics quality. Attached
as C:\Harmony-4196-InputStreamReader_diagnostics.patch.

> [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
>            Priority: Minor
> Consider the following simple test:
> import java.io.*;
> public class Test {
>     public static void main(String[] args) throws Throwable {
> 	new InputStreamReader(new ByteArrayInputStream(new byte[] {(byte) 0xFE, (byte) 0xFF}),
>         System.out.println("SUCCESS");
>     }
> }
> Output on RI:
> Output on Harmony/IBM VM:
> <no output>, I assume the exception below is thrown but not printed out due to
some problem in IBM VM.
> Output on Harmony/DRLVM:
> Uncaught exception in main:
> java.io.UnsupportedEncodingException
>         at java.io.InputStreamReader.<init>(InputStreamReader.java:104)
>         at Test.main(Test.java:5)
> 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.

View raw message