Who performs unicode normalization and when?

Viewed 341

According to JavaScript - The Definitive guide,

JavaScript assumes that the source code it is interpreting has already been normalized and makes no attempt to normalize identifiers, strings, or regular expressions itself.

The Unicode standard defines the preferred encoding for all characters and specifies a normalization procedure to convert text to a canonical form suitable for comparisons.

If JS does not normalize Unicode then who does it and when?

If JavaScript does not normalize Unicode, then how is

"café" === "caf\u00e9"   // => true

and why is

"café" === "cafe\u0301"   // => false

Since both (\u00e9 and e\u0301) are Unicode ways to form é.

1 Answers
Related