You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vasily Zakharov (JIRA)" <ji...@apache.org> on 2007/06/16 23:54:26 UTC
[jira] Updated: (HARMONY-4135) [classlib][luni] String.getBytes()
handles UTF-16 incorrectly
[ https://issues.apache.org/jira/browse/HARMONY-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vasily Zakharov updated HARMONY-4135:
-------------------------------------
Summary: [classlib][luni] String.getBytes() handles UTF-16 incorrectly (was: [classlib][luni] InputStream handles UTF-16 incorrectly)
> [classlib][luni] String.getBytes() handles UTF-16 incorrectly
> -------------------------------------------------------------
>
> Key: HARMONY-4135
> URL: https://issues.apache.org/jira/browse/HARMONY-4135
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Vasily Zakharov
> Assignee: Tim Ellison
> Priority: Minor
> Attachments: H-4135_test.patch
>
>
> Here's the simple test demonstrating the problem:
> import java.io.*;
> public class Test {
> public static void main(String[] args) throws Throwable {
> InputStream input = new ByteArrayInputStream("-".getBytes("UTF-16"));
> int first = (input.read() & 0xFF);
> int second = (input.read() & 0xFF);
> System.out.println("" + first + " " + second);
> }
> }
> Output on RI:
> 254 255
> Output on Harmony (both IBM VM and DRL VM):
> 255 254
> This problem was discovered while investigating the HARMONY-3850 issue with Eclipse Unit Test org.eclipse.core.tests.runtime.content.IContentTypeManagerTest.testContentDescription().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.