A few thoughts…

If we consider character-range indices as referring to the points between 
characters, not the positions of the characters themselves, then there's no 
confusion over whether a character should be included - a character is either 
inside the range or outside of it.

XML is a representation of the document and its content, it is not the content 
itself; similarly, UTF-8 is a representation of the text, not the text itself - 
in both cases, if you want the content then you must decode the representation 
first. This means references to content must be made regarding the decoded 
version.

For messages of the form "/me …", references must be to this version, before 
any further transformations (such as inserting the nickname.) There's no 
guarantee that the nickname you intend is the same as the one which will be 
used, and could thus have a different length, e.g. the recipient has set a 
custom nickname for you, or you send that message while the recipient is 
offline and then change your nickname before it's received.

_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: [email protected]
_______________________________________________

Reply via email to