Skip to content

Commit 0dba3a2

Browse files
authored
Split surrogate into leading and trailing
For the Encoding Standard.
1 parent 8ee207b commit 0dba3a2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

infra.bs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,8 +803,13 @@ to as "U+0029 RIGHT PARENTHESIS", because even though it renders, this avoids un
803803
<p><a>Code points</a> are sometimes referred to as <a>characters</a> and in certain contexts are
804804
prefixed with "0x" rather than "U+".
805805

806-
<p>A <dfn export>surrogate</dfn> is a <a>code point</a> that is in the range U+D800 to U+DFFF,
807-
inclusive.
806+
<p>A <dfn export>leading surrogate</dfn> is a <a>code point</a> that is in the range U+D800 to
807+
U+DBFF, inclusive.
808+
809+
<p>A <dfn export>trailing surrogate</dfn> is a <a>code point</a> that is in the range U+DC00 to
810+
U+DFFF, inclusive.
811+
812+
<p>A <dfn export>surrogate</dfn> is a <a>leading surrogate</a> or a <a>trailing surrogate</a>.
808813

809814
<p>A <dfn export>scalar value</dfn> is a <a>code point</a> that is not a <a>surrogate</a>.
810815

@@ -896,7 +901,7 @@ where <a>UTF-8 encode</a> comes into play.
896901
<!-- It's also useful if you can imagine the subsystem to be implemented in Rust -->
897902

898903
<p>To <dfn export for="string,JavaScript string" id=javascript-string-convert>convert</dfn> a
899-
<a>string</a> into a <a>scalar value string</a>, replace any <a>surrogates</a> with U+FFFD.
904+
<a>string</a> into a <a>scalar value string</a>, replace any <a>surrogates</a> with U+FFFD (�).
900905

901906
<div class=note>
902907
<p>The replaced surrogates are never part of surrogate pairs, since the process of interpreting the

0 commit comments

Comments
 (0)