Thanks @mathias for https://mathiasbynens.be/notes/javascript-unicode … - super useful in figuring out a @reactnative bug we were having - we were accidentally sending just half of a surrogate half and getting a native C++ exception when it was parsed in iOS.
It sounds like the upcoming Intl.Segmenter API is what you *really* want. Coming soon!
-
-
Possibly, we're using it to group contacts in a contact list by first letter of first name, so ideally ä and à and á would all come out as just "a". I'm not sure what the best way to achieve that is though. The current approach *seems* to at least ignore combining marks.
-
You could accomplish that by adding String.prototype.normalize to the mix.
- 2 more replies
New conversation -
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.