~/talk

JavaScript ♥ Unicode

Talkat JSConf EU 2014 · 2014-09-13..09-14· [javascript, web-platform]
slides:none on file

JavaScript stores characters as UCS‑2/UTF‑16 so many emoji and astral code points become surrogate pairs and break length, reverse and regex logic — a real bug once limited tweets to ~70 piles of poo. Workarounds shown include using Array.from, String.fromCodePoint, codePointAt, for‑of iteration, Unicode normalization (unorm) and libraries: Punycode, regenerate, and the regexpu compiler that rewrites ES6 /u regular expressions to ES5. ECMAScript 6 features make correct handling far simpler.

AI-written summary · about

  1. 0:00Start
  2. 8:10Surrogate pairs
  3. 12:23JavaScript escape sequences
  4. 13:38Unicode normalization
  5. 15:28Reversing a string in JavaScript
  6. 18:28Iterate over all symbols in a string
  7. 21:24Create Unicode-aware regular expressions
  8. 24:21Unicode regex transpiler
~/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.