Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.1
-
None
-
N/A
Description
One of my JEXL programmers discovered an undocumented feature of JEXL that they could use the Java-style \uXXXX escape sequence in string literals (this might be JEXL-22). This is useful enough to be worth documenting.
It's not clear to me if the \uXXXX sequences can only be used within string literals (as in C) or anywhere in a JEXL script (as in Java). I tried creating a JEXL string literal that used \u0027 instead of a single quote as its delimiter, but it didn't work, so I suspect this is just for string literals.
For reference, the escape sequences are documented under "String literals" in syntax.xml like this:
<p>The escape character is <code>\</code> (backslash); it only escapes the string delimiter</p>
By the way, the second clause is not strictly true, since (experimentally) the escape character can also be escaped (this might be JEXL-98). This might be obvious enough that it doesn't need to be documented, though.