Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
\u
only takes 4 hex digits,\U
takes 8 (and can thus encode astral characters)\u
escape only takes 4 hex digits, for astral characters the surrogate pairs must be provided explicitlyThe Python, JS, JSON and Java snippets encoded U+1F59 {GREEK CAPITAL LETTER UPSILON WITH DASIA} followed by U+0036 {DIGIT SIX} rather than U+1F596 {RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS}.
It is possible that other languages have the same issue. According to CPPReference, C++ unicode escapes work the same way Python's do, and the C11 draft I have (ISO/IEC 9899:201x — April 12, 2011 § 6.4.3) specifies essentially the same thing:
\u
is followed by 4 hex digits,\U
is followed by 8: