This commit is contained in:
Quinn Flavel 2020-02-10 11:09:15 -05:00
parent 1c2dd6a282
commit 16590d9770
No known key found for this signature in database
GPG key ID: EFCF047CF5256136

View file

@ -1,6 +1,6 @@
# Unicode: flag "u" and class \p{...}
JavaScript uses [Unicode encoding](https://en.wikipedia.org/wiki/Unicode) for strings. Most characters are encoding with 2 bytes, but that allows to represent at most 65536 characters.
JavaScript uses [Unicode encoding](https://en.wikipedia.org/wiki/Unicode) for strings. Most characters are encoded with 2 bytes, but that allows to represent at most 65536 characters.
That range is not big enough to encode all possible characters, that's why some rare characters are encoded with 4 bytes, for instance like `𝒳` (mathematical X) or `😄` (a smile), some hieroglyphs and so on.