Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 23895 invoked from network); 28 Feb 2009 04:15:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Feb 2009 04:15:41 -0000 Received: (qmail 81529 invoked by uid 500); 28 Feb 2009 04:15:39 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 81456 invoked by uid 500); 28 Feb 2009 04:15:39 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 81445 invoked by uid 99); 28 Feb 2009 04:15:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Feb 2009 20:15:39 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Feb 2009 04:15:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6D58C234C4AE for ; Fri, 27 Feb 2009 20:15:15 -0800 (PST) Message-ID: <2099262108.1235794515446.JavaMail.jira@brutus> Date: Fri, 27 Feb 2009 20:15:15 -0800 (PST) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (LANG-480) StringEscapeUtils.escapeHtml incorrectly converts unicode characters above U+00FFFF into 2 characters In-Reply-To: <2053374472.1232473020229.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LANG-480?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated LANG-480: ------------------------------- Fix Version/s: 3.0 > StringEscapeUtils.escapeHtml incorrectly converts unicode characters abov= e U+00FFFF into 2 characters > -------------------------------------------------------------------------= ---------------------------- > > Key: LANG-480 > URL: https://issues.apache.org/jira/browse/LANG-480 > Project: Commons Lang > Issue Type: Bug > Affects Versions: 2.4 > Environment: doesn't matter > Reporter: Alexander Kj=C3=A4ll > Priority: Minor > Fix For: 3.0 > > Attachments: lang-480.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Characters that are represented as a 2 characters internaly by java are i= ncorrectly converted by the function. The following test displays the probl= em quite nicely: > import org.apache.commons.lang.*; > public class J2 { > public static void main(String[] args) throws Exception { > // this is the utf8 representation of the character: > // COUNTING ROD UNIT DIGIT THREE > // in unicode > // codepoint: U+1D362 > byte[] data =3D new byte[] { (byte)0xF0, (byte)0x9D, (byte)0x8D, = (byte)0xA2 }; > //output is: �� > // should be: 𝍢 > System.out.println("'" + StringEscapeUtils.escapeHtml(new String(= data, "UTF8")) + "'"); > } > } > Should be very quick to fix, feel free to drop me an email if you want a = patch. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.