RFR: JDK-8263261 Extend String::translateEscapes to support unicode escapes [v8]
Naoto Sato
naoto at openjdk.org
Tue Jan 23 21:44:27 UTC 2024
On Tue, 23 Jan 2024 18:53:39 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:
>> Currently String::translateEscapes does not support unicode escapes, reported as a IllegalArgumentException("Invalid escape sequence: ..."). String::translateEscapes should translate unicode escape sequences to provide full coverage,
>
> Jim Laskey has updated the pull request incrementally with one additional commit since the last revision:
>
> Requested changes
src/java.base/share/classes/java/lang/String.java line 4229:
> 4227: * <th scope="row">{@code \u005Cu...uXXXX}</th>
> 4228: * <td>unicode escape</td>
> 4229: * <td>single character UTF-16 equivalent</td>
It would be clearer to have "single UTF-16 code unit equivalent" as the translation explanation
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17491#discussion_r1464029302
More information about the core-libs-dev
mailing list