Steps to Reproduce
Run the command in chat:
/tellraw @s "\N{LINE FEED (LF)}"
Expected Result
Prints a line feed character (\n).
The name can be verified in jshell:
jshell> Character.getName('\n')
$1 ==> "LINE FEED (LF)"Observed Result
The command doesn’t parse.
The error message is:
Expected literal }
...LINE FEED (LF)}"<--[HERE]Code Analysis
In SnbtGrammar.java:
private static final Pattern UNICODE_NAME = Pattern.compile("[-a-zA-Z0-9 ]+");The pattern is too strict so it doesn’t parse the parentheses.
Is there any implementation anywhere that will parse that correctly? While “LINE FEED” and “LF” are both valid names for U+000A, “LINE FEED (LF)” is not. Unicode character names cannot contain parentheses. Whatever jshell is doing, it’s not returning a formally defined identifier.