commons-text icon indicating copy to clipboard operation
commons-text copied to clipboard

[TEXT-XXX] Support ECMAScript \x unescaping in StringEscapeUtils

Open timdp opened this issue 1 year ago • 2 comments

Currently, StringEscapeUtils unescapes ECMAScript using the Java strategy.

This mostly works, but ECMAScript additionally supports \xCC escapes, where CC is a hex code.

This PR adds support for that, as well as an initial test.

I took the liberty of making the child translators of the Java aggregate translator reusable, so I could basically extend the list for the ES version. If we prefer to duplicate that code or to use a varargs list or something, I'm absolutely fine with that as well.

I just subscribed to the dev list and requested access to Jira. I will update the PR title once I've created the corresponding issue.

timdp avatar Sep 05 '24 12:09 timdp

My Jira account request got denied and I have a low tolerance for red tape, so I'll just leave this PR here for anyone who cares enough to get it merged.

timdp avatar Sep 05 '24 14:09 timdp

Hello @timdp Please run 'mvn' by itself to catch all build failures.

garydgregory avatar Sep 10 '24 03:09 garydgregory