8000 Clarify the absolute nature of "any code point" (#282) · unicode-org/message-format-wg@752dc44 · GitHub
[go: up one dir, main page]

Skip to content

Commit 752dc44

Browse files
authored
Clarify the absolute nature of "any code point" (#282)
Adds explicit mention of cases that are often overlooked.
1 parent 19d581b commit 752dc44

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

spec/message.ebnf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ PlainEnd ::= PlainChar - WhiteSpace
3333
/* Text */
3434
Text ::= (TextChar | TextEscape)+
3535
TextChar ::= AnyChar - ('[' | ']' | '{' | '}' | Esc)
36-
AnyChar ::= .
36+
AnyChar ::= [#x0-#x10FFFF]
3737

3838
/* Names */
3939
Variable ::= '$' Name /* ws: explicit */

spec/syntax.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ and `\` (which starts an escape sequence).
406406
```ebnf
407407
Text ::= (TextChar | TextEscape)+ /* ws: explicit */
408408
TextChar ::= AnyChar - ('[' | ']' | '{' | '}' | Esc)
409-
AnyChar ::= .
409+
AnyChar ::= [#x0-#x10FFFF]
410410
```
411411

412412
### Names
@@ -446,6 +446,15 @@ Any Unicode code point is allowed in literals,
446446
with the exception of its delimiters `(` and `)`,
447447
and `\` (which starts an escape sequence).
448448

449+
This includes line-breaking characters (such as U+000A LINE FEED and U+000D CARRIAGE RETURN),
450+
other control characters (such as U+0000 NULL and U+0009 TAB),
451+
permanently reserved noncharacters (U+FDD0 through U+FDEF and U+<i>n</i>FFFE and U+<i>n</i>FFFF where <i>n</i> is 0x0 through 0x10),
452+
surrogate code points (U+D800 through U+DBFF),
453+
private-use code points (U+E000 through U+F8FF, U+F0000 through U+FFFFD, and U+100000 through U+10FFFD),
454+
and unassigned code points.
455+
456+
All code points of a literal are preserved.
457+
449458
```ebnf
450459
Literal ::= '(' (LiteralChar | LiteralEscape)* ')' /* ws: explicit */
451460
LiteralChar ::= AnyChar - ('(' | ')' | Esc)

0 commit comments

Comments
 (0)
0