commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <>
Subject [jira] Commented: (LANG-498) Add StringEscapeUtils.escapeText() methods
Date Wed, 24 Jun 2009 05:02:07 GMT


Henri Yandell commented on LANG-498:

This would now be implemented as:

        new AggregateTranslator(
            new EscapeLowAsciiAsUnicode(),
            new EscapeNonAsciiAsUnicode()

Not escaping \ would still leave it one-way. Possibly that would become:

  static import org.apache.commons.lang.text.translate.EscapeUtils.*;


Though that all has the assumption that \b is the escape for backspace and not the unicode
value for the number etc.

Alternatively, it would not be a huge change for this to be doable:


if \b should go to unicode etc.

> Add StringEscapeUtils.escapeText() methods
> ------------------------------------------
>                 Key: LANG-498
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Henning Schmiedehausen
>             Fix For: 3.0
>         Attachments: LANG-498.patch
> I needed to escape text to be print out to a file; mainly so that all non-ASCII characters
(< 32 and >=127) are printed out as escapes (if available) or unicode escapes. This
is a one-way conversion, there is no way to find out whether a String contained "\\n" or a
newline before conversion, so I just set up escapeText() methods, no unescapeText(). 
> Please apply to the next release of commons-lang. :-) 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message