From d5948f7bf2a445ccd0a14ac9b06e57dcee397ed7 Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Sat, 28 Nov 2020 23:18:32 -0800 Subject: [PATCH] Editorial: Explictly 'convert' numeric value to code unit in CodePointToString (#2018) --- spec.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec.html b/spec.html index 19aa5c7f01..c54f00de3e 100644 --- a/spec.html +++ b/spec.html @@ -10220,9 +10220,9 @@

Static Semantics: UTF16EncodeCodePoint ( _cp_ )

The abstract operation UTF16EncodeCodePoint takes argument _cp_ (a Unicode code point). It performs the following steps when called:

1. Assert: 0 ≤ _cp_ ≤ 0x10FFFF. - 1. If _cp_ ≤ 0xFFFF, return the String value consisting of _cp_. - 1. Let _cu1_ be floor((_cp_ - 0x10000) / 0x400) + 0xD800. - 1. Let _cu2_ be ((_cp_ - 0x10000) modulo 0x400) + 0xDC00. + 1. If _cp_ ≤ 0xFFFF, return the String value consisting of the code unit whose value is _cp_. + 1. Let _cu1_ be the code unit whose value is floor((_cp_ - 0x10000) / 0x400) + 0xD800. + 1. Let _cu2_ be the code unit whose value is ((_cp_ - 0x10000) modulo 0x400) + 0xDC00. 1. Return the string-concatenation of _cu1_ and _cu2_.