~/talk

Unicode in JavaScript

Talkat dotJS 2012 · 2012-11-30..12-01· [javascript]
slides:none on file

JavaScript strings use UTF-16 so many emoji and math letters live outside the BMP, creating surrogate pairs that make "length" return two for one visible symbol. Unicode spans 1,114,112 code points across 17 planes; the BMP holds 65,536. Workarounds shown include manual surrogate math and ES6 features like String.fromCodePoint and code point escapes \u{...}, plus a small online validator that actually checks whether a name is a valid JS identifier.

AI-written summary · about

  1. 0:00What is Unicode
  2. 2:00Code points
  3. 5:00Hexadecimal escape sequences
  4. 7:00Surrogates
  5. 9:00Length properties
  6. 13:00Solutions
  7. 17:00String Code Points
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.