News for hackers. Stuff that matters.
Re:UCS vs. UTF-8 as Internal String Encoding by lisper on Friday May 29, 2015 @02:14AM (#9622998)
> It only has to be an abstract class if you want to prevent the existence of invalid offsets

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.

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.

Re:UCS vs. UTF-8 as Internal String Encoding by lisper on Friday May 29, 2015 @11:06AM (#9624978)
Hm, that's a good point.