harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Markov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3307) [classlib][compatibility] String initialized with unicode simbol is prrinted differently on drlvm and RI
Date Tue, 15 May 2007 05:32:16 GMT

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

Mikhail Markov commented on HARMONY-3307:
-----------------------------------------

I'm not sure if it's file.encoding issue.
For example, the following code produces different result on DRLVM/IBM VME and RI:
import java.nio.charset.Charset;
import java.nio.ByteBuffer;

public class Test {
    public static void main(String[] args) {
        Charset charset = Charset.forName("ISO-8859-1");
        ByteBuffer buffer = charset.encode("\u3400");
        byte[] b = new byte[buffer.limit()];
        buffer.get(b);

        for (int i = 0; i < b.length; ++i) {
            System.out.println("b[" + i + "] = " + b[i]);
        }
    }
}

On RI:
b[0] = 63

On J9/DRLVM:
b[0] = 26

> [classlib][compatibility] String initialized with unicode simbol is prrinted differently
on drlvm and RI
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3307
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3307
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Aleksey Ignatenko
>         Attachments: Test.java
>
>
> If one initializes String with value containing unicode simbol (\uxxxx) then it is printed
differently on drlvm and RI.
> Code:
> String ss = "dir\u3400";
> System.out.println(ss);
> Output.
> sun: dir?
> drlvm: dir->

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message