[Standards] Proposed XMPP Extension: Character counting in message bodies
teddsterr at outlook.com
Fri Dec 20 17:52:16 UTC 2019
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Standards