commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-728) StringEscapeUtils.escapeXml(str) does not support supplemental characters.
Date Tue, 19 Jul 2011 04:37:57 GMT

    [ https://issues.apache.org/jira/browse/LANG-728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067492#comment-13067492
] 

Henri Yandell commented on LANG-728:
------------------------------------

The API has changed in Lang 3.0; however the issue remains. A failing test (with @Ignore)
has been added to StringEscapeUtilsTest. Need to resolve this in 3.0.1.

> StringEscapeUtils.escapeXml(str) does not support supplemental characters.
> --------------------------------------------------------------------------
>
>                 Key: LANG-728
>                 URL: https://issues.apache.org/jira/browse/LANG-728
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 2.6
>            Reporter: Taro Yabuki
>            Priority: Minor
>              Labels: patch
>             Fix For: 3.0.1
>
>         Attachments: lang_2_6_escapexml_20110716.diff
>
>
> Hello.
> StringEscapeUtils.escapeXml(str) escapes Unicode characters greater than 0x7f to their
numerical \\u equivalent:
> String str = StringEscapeUtils.escapeXml("\uD84C\uDFB4");
> System.out.println(str);
> //&#55372;&#57268;
> But, the output should be &#144308;.
> According to W3C document "Using character escapes in markup and CSS," We must use the
single, code point value for supplemental character.
> http://www.w3.org/International/questions/qa-escapes
> In fact, &#55372;&#57268; is not rendered correctly in some web browsers e.g.,
Firefox 5.0 and Chrome 12.0.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message