access to Unicode SMP?

# Peter Michaux (16 years ago)

ES5 Section 7.8.4 discusses UnicodeEscapeSequence which have four hexidecimal digits (i.e. \u0000 to \uFFFF) and allows specification of characters on the Unicode Basic Multilingual Plane. Is it possible in ECMAScript to specify characters on higher planes like the Supplementary Multilingual Plane? If not, why was that access excluded?

Thanks, Peter

# David-Sarah Hopwood (16 years ago)

Peter Michaux wrote:

ES5 Section 7.8.4 discusses UnicodeEscapeSequence which have four hexidecimal digits (i.e. \u0000 to \uFFFF) and allows specification of characters on the Unicode Basic Multilingual Plane. Is it possible in ECMAScript to specify characters on higher planes like the Supplementary Multilingual Plane?

It is possible to specify their UTF-16 representations using \u escapes.

If not, why was that access excluded?

It wasn't a priority to add specific syntax for supplementary escapes in ES5 (remember that ES5 has very few syntax extensions in general, and the ones that it has, such as the get/set object literal syntax, are taken unchanged from existing implementation precedent). I hope that such a syntax will be included in Harmony, though, along with more comprehensive Unicode library support.