Re:UCS vs. UTF-8 as Internal String Encoding
by TheCoelacanth on Friday May 29, 2015 @09:25AM
(#9624351)
> True, but the validity check for the constant-width case can be done in constant time.
The same is true of UTF-8 because it is self-synchronizing. You only have to check that the byte at the given offset is either 0xxxxxxx or 11xxxxxx.
Wouldn't you want that? I would.
> the same is true if you have constant width code points
True, but the validity check for the constant-width case can be done in constant time.