4 ms·
> In principle, UTF-16 would have the advantage of constant time addressing of single characters, but in practice most programming languages do not provide data
by account42 6y ago
> In principle, UTF-16 would have the advantage of constant time addressing of single characters, but in practice most programming languages do not provide data types for this, with the exception of Go and rust.
No it wouldn't - UTF-16 is a variable-length encoding of Unicode codepoints just like UTF-8. Not to mention that what most normal people think of as "characters", i.e. grapheme clusters, are variable length even with UTF-32.