You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2013/08/28 11:20:53 UTC
[jira] [Resolved] (LANG-911) UTF8 4byte (un)escapeJava not work
correctly
[ https://issues.apache.org/jira/browse/LANG-911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved LANG-911.
-----------------------
Resolution: Not A Problem
Fix Version/s: 3.1
URL: http://svn.apache.org/r1518116
Log:
LANG-911 UTF8 4byte (un)escapeJava not work correctly
The following test passes:
{code}
public void testLang911() {
String bellsTest = "\ud83d\udc80\ud83d\udd14";
String value = StringEscapeUtils.escapeJava(bellsTest);
String valueTest = StringEscapeUtils.unescapeJava(value);
assertEquals(bellsTest, valueTest);
}
{code}
> UTF8 4byte (un)escapeJava not work correctly
> --------------------------------------------
>
> Key: LANG-911
> URL: https://issues.apache.org/jira/browse/LANG-911
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 3.1
> Environment: Java 1.6
> Reporter: PV
> Fix For: 3.1
>
>
> String bellsTest = "\ud83d\udc80\ud83d\udd14";
>
> String value = StringEscapeUtils.escapeJava(bellsTest);
> String valueTest = StringEscapeUtils.unescapeJava(value);
> System.out.println(bellsTest);
> System.out.println(value);
> System.out.println(valueTest);
> Error:
> !!! bellsTest (befor) != valueTest (after escapeJava&unescapeJava)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira