3 ms·
> Constrast with UTF-16, where a substring might match the bytes at an odd index in the original string, corresponding to totally different characters. This is
by zzo38computer 2y ago
> Constrast with UTF-16, where a substring might match the bytes at an odd index in the original string, corresponding to totally different characters.
This is not a problem if you have the correct alignment; since it works on 16-bit units then you would be searching/indexing/splitting on such boundaries. There are surrogates, but you can easily self-delimit them like you can with UTF-8, too.