News for hackers. Stuff that matters.
Re:UCS vs. UTF-8 as Internal String Encoding by wtetzner on Thursday May 28, 2015 @02:18PM (#9620024)
Notice he said code units, not code points. Code units are fixed size. So for example, in Java, you have 16-bit code units, and have constant time indexing into them.

So you could use a BreakIterator [1] to iterate through grapheme clusters. The iterator returns the index to the cluster though, not the cluster itself. The index is in terms of code units, not in terms of grapheme clusters.

[1] https://docs.oracle.com/javase/6/docs/api/java/text/BreakIte...

There are no comments on this comment yet.