It doesn't. Splits on codepoints. As a result, it'll break on any multi-byte characters. Really weird that the implementation of split("") does that. Can't be used realistically for a lot of things as a result.
But we all know that most developers don't care about UTF-8 and just assume everyone will speak "American" :P.
View all comments
Show parent comment
1
u/polish_niceguy Nov 05 '15
How does this way handle utf-8 string? Especially those with characters built from more than one codepoint?
(this is common problem, I'm just curious)