Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 50551 invoked from network); 13 Jul 2007 07:58:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jul 2007 07:58:26 -0000 Received: (qmail 40691 invoked by uid 500); 13 Jul 2007 07:58:28 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 40673 invoked by uid 500); 13 Jul 2007 07:58:28 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 40663 invoked by uid 99); 13 Jul 2007 07:58:28 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2007 00:58:28 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2007 00:58:25 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E37F9714212 for ; Fri, 13 Jul 2007 00:58:04 -0700 (PDT) Message-ID: <23852642.1184313484926.JavaMail.jira@brutus> Date: Fri, 13 Jul 2007 00:58:04 -0700 (PDT) From: "Leo Li (JIRA)" To: commits@harmony.apache.org Subject: [jira] Assigned: (HARMONY-4448) XMLEncoded Strings with \n are decoded incorrectly In-Reply-To: <26578586.1184262244973.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leo Li reassigned HARMONY-4448: ------------------------------- Assignee: Leo Li > XMLEncoded Strings with \n are decoded incorrectly > -------------------------------------------------- > > Key: HARMONY-4448 > URL: https://issues.apache.org/jira/browse/HARMONY-4448 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: M2 on Win x86 > Reporter: Andrew Cornwall > Assignee: Leo Li > > XMLEncoded Strings which have a \n in them (such as "hello\nthere") are decoded > incorrectly. > The following testcase demonstrates the issue: > public class Bug126404 { > public static void main (String args[]) { > Object object = null; > String encodedString = "\n" + > "\n" + > " hello\n" + > "there\n" + > "\n"; > byte[] in = encodedString.getBytes(); > ByteArrayInputStream inputStream = new ByteArrayInputStream(in); > XMLDecoder decoder = new XMLDecoder(inputStream, "CDS"); > try{ > object = decoder.readObject(); > } > catch (Exception ex) { > ex.printStackTrace(); > } > System.out.println(new String(object.toString())); > } > } > On Sun JDK, this results in: > hello > there > On Harmony M2, this results in: > there -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.