[Standards] RTT, take 2

Remko Tronçon remko at el-tramo.be
Fri Jun 24 09:24:50 UTC 2011


> So I'd say that we should refer to characters in a string, and deal with
> Unicode code-points in the abstract.

I'm wondering whether 'code points' are any better than UTF-8 based
positioning. Isn't it possible that a codepoint position also points
inside a character/glyph/...? Peter could probably shed some light on
this.

The major problem is that you want something that you can tell your
GUI "remove N characters", but that such an operation is very
toolkit-specific and not well specified, and that you don't have any
control over this. For example, in Qt, this would most likely be
implemented using a QTextCursor (
http://doc.trolltech.com/4.7/qtextcursor.html ). However, the text
talks about 'positioning at character X', and it doesn't seem to be
defined what this means. I think that deleting one 'character' using
this API would potentially delete multiple unicode code points? (or
maybe i don't know enough about unicode).

But if my understanding is correct, then i'm not sure if such a
positioning-based API would ever work in practice (for multiple
implementations).

cheers,
Remko



More information about the Standards mailing list