@@ -53,20 +53,21 @@ SourceCharacter ::
5353 - "U+0020–U+FFFF"
5454
5555GraphQL documents are expressed as a sequence of
56- [ Unicode] ( https://unicode.org/standard/standard.html ) characters. However, with
56+ [ Unicode] ( https://unicode.org/standard/standard.html ) code points (informally
57+ referred to as * "characters"* through most of this specification). However, with
5758few exceptions, most of GraphQL is expressed only in the original non-control
5859ASCII range so as to be as widely compatible with as many existing tools,
5960languages, and serialization formats as possible and avoid display issues in
6061text editors and source control.
6162
63+ Note: Non-ASCII Unicode characters may appear freely within {StringValue} and
64+ {Comment} portions of GraphQL.
65+
6266
6367### Unicode
6468
6569UnicodeBOM :: "Byte Order Mark (U+FEFF)"
6670
67- Non-ASCII Unicode characters may freely appear within {StringValue} and
68- {Comment} portions of GraphQL.
69-
7071The "Byte Order Mark" is a special Unicode character which
7172may appear at the beginning of a file containing Unicode which programs may use
7273to determine the fact that the text stream is Unicode, what endianness the text
@@ -804,13 +805,13 @@ StringValue ::
804805 - ` """ ` BlockStringCharacter* ` """ `
805806
806807StringCharacter ::
807- - SourceCharacter but not ` " ` or \ or LineTerminator
808- - \u EscapedUnicode
809- - \ EscapedCharacter
808+ - SourceCharacter but not ` " ` or ` \ ` or LineTerminator
809+ - ` \u ` EscapedUnicode
810+ - ` \ ` EscapedCharacter
810811
811812EscapedUnicode :: /[ 0-9A-Fa-f] {4}/
812813
813- EscapedCharacter :: one of ` " ` \ ` / ` b f n r t
814+ EscapedCharacter :: one of ` " ` ` \ ` ` / ` ` b ` ` f ` ` n ` ` r ` ` t `
814815
815816BlockStringCharacter ::
816817 - SourceCharacter but not ` """ ` or ` \""" `
@@ -825,9 +826,9 @@ be interpreted as the beginning of a block string. As an example, the source
825826{` """""" ` } can only be interpreted as a single empty block string and not three
826827empty strings.
827828
828- Non-ASCII Unicode characters are allowed within single-quoted strings.
829- Since {SourceCharacter} must not contain some ASCII control characters, escape
830- sequences must be used to represent these characters. The {` \ ` }, {` " ` }
829+ Non-ASCII Unicode characters are allowed within single-quoted strings.
830+ Since {SourceCharacter} must not contain some ASCII control characters, escape
831+ sequences must be used to represent these characters. The {` \ ` }, {` " ` }
831832characters also must be escaped. All other escape sequences are optional.
832833
833834** Block Strings**
@@ -892,32 +893,33 @@ StringValue :: `""`
892893
893894StringValue :: ` " ` StringCharacter+ ` " `
894895
895- * Return the Unicode character sequence of all {StringCharacter}
896- Unicode character values.
896+ * Return the sequence of all {StringCharacter} code points.
897897
898- StringCharacter :: SourceCharacter but not ` " ` or \ or LineTerminator
898+ StringCharacter :: SourceCharacter but not ` " ` or ` \ ` or LineTerminator
899899
900- * Return the character value of {SourceCharacter}.
900+ * Return the code point {SourceCharacter}.
901901
902- StringCharacter :: \u EscapedUnicode
902+ StringCharacter :: ` \u ` EscapedUnicode
903903
904- * Return the character whose code unit value in the Unicode Basic Multilingual
905- Plane is the 16-bit hexadecimal value {EscapedUnicode}.
904+ * Let {value} be the 16-bit hexadecimal value represented by the sequence of
905+ {HexDigit} within {EscapedUnicode}.
906+ * Return the code point {value}.
906907
907- StringCharacter :: \ EscapedCharacter
908+ StringCharacter :: ` \ ` EscapedCharacter
908909
909- * Return the character value of {EscapedCharacter} according to the table below.
910+ * Return the code point represented by {EscapedCharacter} according to the
911+ table below.
910912
911- | Escaped Character | Code Unit Value | Character Name |
912- | ----------------- | --------------- | ---------------------------- |
913- | ` " ` | U+0022 | double quote |
914- | ` \ ` | U+005C | reverse solidus (back slash) |
915- | ` / ` | U+002F | solidus (forward slash) |
916- | ` b ` | U+0008 | backspace |
917- | ` f ` | U+000C | form feed |
918- | ` n ` | U+000A | line feed (new line) |
919- | ` r ` | U+000D | carriage return |
920- | ` t ` | U+0009 | horizontal tab |
913+ | Escaped Character | Code Point | Character Name |
914+ | ----------------- | ---------- | ---------------------------- |
915+ | { ` " ` } | U+0022 | double quote |
916+ | { ` \ ` } | U+005C | reverse solidus (back slash) |
917+ | { ` / ` } | U+002F | solidus (forward slash) |
918+ | { ` b ` } | U+0008 | backspace |
919+ | { ` f ` } | U+000C | form feed |
920+ | { ` n ` } | U+000A | line feed (new line) |
921+ | { ` r ` } | U+000D | carriage return |
922+ | { ` t ` } | U+0009 | horizontal tab |
921923
922924StringValue :: ` """ ` BlockStringCharacter* ` """ `
923925
0 commit comments