Great talk about Unicode & JS by @mathias - http://echo360.rub.de:8080/ess/echo/presentation/20d06e0b-94e0-476b-b7f6-333d37afb82b …
37:00 "lone high surrogates are allowed in js" Why? And why not the lows?
-
-
Replying to @MaximeEuziere
@MaximeEuziere Lone low surrogates are allowed too.1 reply 0 retweets 0 likes -
Replying to @MaximeEuziere
@mathias Oh, I know. Mine matches empty strings. That's bad. =(1 reply 0 retweets 0 likes -
Replying to @MaximeEuziere
.
@mathias so this would be better (and smaller too): // Match JS string with 1 unicode char: /^[\0-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]$/1 reply 0 retweets 0 likes
Replying to @MaximeEuziere
@MaximeEuziere As long as the `^` and `$` are there, then yes, this works for your use case.
4:48 AM - 2 Jun 2014
from Dendermonde, België
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.