Skip to content
This repository has been archived by the owner on Dec 23, 2020. It is now read-only.

mongolian vowel separator #53

Open
SheetJSDev opened this issue Feb 25, 2018 · 1 comment
Open

mongolian vowel separator #53

SheetJSDev opened this issue Feb 25, 2018 · 1 comment

Comments

@SheetJSDev
Copy link

There was a backwards-incompatible change in ES7 corresponding to whitespace, as the Unicode version pin was removed:

https://www.ecma-international.org/ecma-262/6.0/#sec-white-space

ECMAScript implementations must recognize as WhiteSpace code points listed in the “Separator, space” (Zs) category by Unicode 5.1.

https://www.ecma-international.org/ecma-262/7.0/#sec-white-space

ECMAScript implementations must recognize as WhiteSpace code points listed in the “Separator, space” (Zs) category.

The MONGOLIAN VOWEL SEPARATOR U+180E used to be in Zs but was moved to Cf in Unicode 6.3.0. ES7 mandates Unicode 8.0.0 or higher. As a result, whitespace-sensitive methods will behave differently.

For example, consider "\u180e".trim().length. An ES6-compatible browser like Safari 11 will remove the character, yielding a length of 0. However, an ES7-compatible engine should not remove the character, yielding a length of 1.

String#trim and other methods that lean on whitespace are affected.

@ljharb
Copy link
Member

ljharb commented Sep 16, 2019

tc39/ecma262#1698 corrects this omission in the spec's Annex E.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants