Here is the collected list of changes to section 2.4.2.4:
3rd paragraph:
OLD:
encoded-arb-octets = "${hex:" hex-pair-seq "}"
hex-pair-seq = hex-pair *(WSP hex-pair)
^^^
hex-pair = 1*2HEXDIG
NEW:
blank = WSP / CRLF
encoded-arb-octets = "${hex:" hex-pair-seq "}"
hex-pair-seq = *blank hex-pair *(1*blank hex-pair) *blank
^^^^^^ ^^^^^^^ ^^^^^^
hex-pair = 1*2HEXDIG
5th paragraph:
OLD:
encoded-unicode-char = "${unicode:" unicode-hex-seq "}"
unicode-hex-seq = unicode-hex *(WSP unicode-hex)
^^^
unicode-hex = 1*6HEXDIG
^^^
NEW:
encoded-unicode-char = "${unicode:" unicode-hex-seq "}"
unicode-hex-seq = *blank unicode-hex *(1*blank unicode-hex) *blank
^^^^^^ ^^^^^^^ ^^^^^^
unicode-hex = 1*HEXDIG
^^
Insert after the following paragraph:
It is an error for a script to use a hexadecimal value that isn't in
either the range 0 to D7FF or the range E000 to 10FFFF. (The range
D800 to DFFF is excluded as those character numbers are only used as
part of the UTF-16 encoding form and are not applicable to the UTF-8
encoding that the syntax here represents.)
a new paragraph:
Note: Implementations MUST NOT raise an error for an out of
range Unicode value unless the sequence containing it is
well-formed according to the grammar.
8th paragraph:
OLD:
In the following script, message A is discarded, since the specified
^
test string is equivalent to "$$$".
NEW:
In the following script, message B is discarded, since the specified
^
test string is equivalent to "$$$".
And add the following paragraph to the end of the section:
The following examples demonstrate valid and invalid encodings
and how they are handled:
"$${hex:40}" -> "$@"
"${hex: 40 }" -> "@"
"${HEX: 40}" -> "@"
"${hex:40" -> "${hex:40"
"${hex:400}" -> "${hex:400}"
"${hex:40${hex:40}}" -> "${hex:40(_at_)}"
"${unicode:40}" -> "@"
"${ unicode:40}" -> "${ unicode:40}"
"${UNICODE:40}" -> "@"
"${UnICoDE:0000040}" -> "@"
"${Unicode:40}" -> "@"
"${Unicode:Cool}" -> "${Unicode:Cool}"
"${unicode:1000000}" -> error
"${unicode:200000}" -> error
"${Unicode:DF01} -> error