Preparation, Enforcement, and Comparison of Internationalized Strings Representing NicknamesFilamentP.O. Box 787ParkerCO80134USA+1 720 256 6756peter@filament.comhttps://filament.com/
Applications
PRECISnicknameSIPSIMPLEXMPPMSRPXCONchatroomsThis document describes methods for handling Unicode strings representing memorable, human-friendly names (called "nicknames", "display names", or "petnames") for people, devices, accounts, websites, and other entities. This document obsoletes RFC 7700.A number of technologies and applications provide the ability for a person to choose a memorable, human-friendly name in a communications context, or to set such a name for another entity such as a device, account, contact, or website. Such names are variously called "nicknames" (e.g., in chat room applications), "display names" (e.g., in Internet mail), or "petnames" (see ); for consistency, these are all called "nicknames" in this document.Nicknames are commonly supported in technologies for textual chat rooms, e.g., Internet Relay Chat and multi-party chat technologies based on the Extensible Messaging and Presence Protocol (XMPP) , the Message Session Relay Protocol (MSRP) , and Centralized Conferencing (XCON) . Recent chat room technologies also allow internationalized nicknames because they support code points from outside the ASCII range , typically by means of the Unicode coded character set . Although such nicknames tend to be used primarily for display purposes, they are sometimes used for programmatic purposes as well (e.g., kicking users or avoiding nickname conflicts).A similar usage enables a person to set their own preferred display name or to set a preferred display name for another user (e.g., the "display-name" construct in the Internet message format and in XMPP).Memorable, human-friendly names are also used in contexts other than personal messaging, such as names for devices (e.g., in a network visualization application), websites (e.g., for bookmarks in a web browser), accounts (e.g., in a web interface for a list of payees in a bank account), people (e.g., in a contact list application), and the like.The rules specified in this document can be applied in all of the foregoing contexts.To increase the likelihood that memorable, human-friendly names will work in ways that make sense for typical users throughout the world, this document defines rules for preparing, enforcing, and comparing internationalized nicknames.Many important terms used in this document are defined in , , and .The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in .The following rules apply within the Nickname profile of the PRECIS FreeformClass.Width Mapping Rule: There is no width-mapping rule (such a rule is not necessary because width mapping is performed as part of normalization using Normalization Form KC (NFKC) as specified below).Additional Mapping Rule: The additional mapping rule consists of the following sub-rules.
Map any instances of non-ASCII space to ASCII space (U+0020); a non-ASCII space is any Unicode code point having a general category of "Zs", naturally with the exception of U+0020. (The inclusion of only ASCII space prevents confusion with various non-ASCII space code points, many of which are difficult to reproduce across different input methods.)Remove any instances of the ASCII space character at the beginning or end of a nickname (e.g., "stpeter " is mapped to "stpeter").Map interior sequences of more than one ASCII space character to a single ASCII space character (e.g., "St Peter" is mapped to "St Peter").Case Mapping Rule: Apply the Unicode toLower() operation, as defined in the Unicode Standard . In applications that prohibit conflicting nicknames, this rule helps to reduce the possibility of confusion by ensuring that nicknames differing only by case (e.g., "stpeter" vs. "StPeter") would not be presented to a human user at the same time. (As explained below, this is typically appropriate only for comparison, not for enforcement.)Normalization Rule: Apply Unicode Normalization Form KC. Because NFKC is more "aggressive" in finding matches than other normalization forms (in the terminology of Unicode, it performs both canonical and compatibility decomposition before recomposing code points), this rule helps to reduce the possibility of confusion by increasing the number of code points that would match (e.g., U+2163 ROMAN NUMERAL FOUR would match the combination of U+0049 LATIN CAPITAL LETTER I and U+0056 LATIN CAPITAL LETTER V).Directionality Rule: There is no directionality rule. The "Bidi Rule" (defined in ) and similar rules are unnecessary and inapplicable to nicknames, because it is perfectly acceptable for a given nickname to be presented differently in different layout systems (e.g., a user interface that is configured to handle primarily a right-to-left script versus an interface that is configured to handle primarily a left-to-right script), as long as the presentation is consistent in any given layout system.An entity that prepares a string for subsequent enforcement according to this profile MUST ensure that the string consists only of Unicode code points that conform to the FreeformClass string class defined in .An entity that performs enforcement according to this profile MUST prepare a string as described in and MUST also apply the following rules specified in in the order shown:
Additional Mapping RuleNormalization RuleNote: An entity SHOULD NOT apply the Case Mapping Rule during enforcement, because typically it is appropriate only during comparison.After all of the foregoing rules have been enforced, the entity MUST
ensure that the nickname is not zero bytes in length (this is done
after enforcing the rules to prevent applications from mistakenly
omitting a nickname entirely, because when internationalized
strings are accepted, a non-empty sequence of characters can
result in a zero-length nickname after canonicalization). An entity that performs comparison of two strings according to this
profile MUST prepare each string as specified in and
MUST apply the following rules specified in in the order
shown:
Additional Mapping RuleCase Mapping RuleNormalization RuleThe two strings are to be considered equivalent if and only if they are an exact
octet-for-octet match (sometimes called "bit-string identity").
The following examples illustrate a small number of nicknames that are consistent with the format defined above, along with the output string resulting from application of the PRECIS rules (note that the characters < and > are used to delineate the actual nickname and are not part of the nickname strings).Regarding examples 5, 6, and 7: applying the Unicode toLower() operation
to GREEK CAPITAL LETTER SIGMA (U+03A3) results in GREEK SMALL LETTER
SIGMA (U+03C3), however the toLower() operation does not modify GREEK SMALL
LETTER FINAL SIGMA (U+03C2); therefore, the comparison operation defined in
would result in matching of the nicknames in
examples 5 and 6 but not the nicknames in examples 5 and 7 or 6 and 7.
Regarding example 8: symbol characters such as BLACK CHESS KING
(U+265A) are allowed by the PRECIS FreeformClass and thus can be
used in nicknames. Regarding example 9: applying the Unicode
toLower() operation to ROMAN NUMERAL FOUR (U+2163) results in SMALL ROMAN
NUMERAL FOUR (U+2173), and applying NFKC to SMALL ROMAN NUMERAL
FOUR (U+2173) results in LATIN SMALL LETTER I (U+0069) LATIN SMALL
LETTER V (U+0086).This specification defines only the PRECIS-based rules for handling of nickname strings. It is the responsibility of an application protocol (e.g., MSRP, XCON, or XMPP) or application definition to specify the protocol slots in which nickname strings can appear, the entities that are expected to enforce the rules governing nickname strings, and when in protocol processing or interface handling the rules need to be enforced. See Section 6 of for guidelines about using PRECIS profiles in applications.Above and beyond the PRECIS-based rules specified here, application protocols can also define application-specific rules governing nickname strings (rules regarding the minimum or maximum length of nicknames, further restrictions on allowable code points or character ranges, safeguards to mitigate the effects of visually similar characters, etc.).Naturally, application protocols can also specify rules governing the actual use of nicknames in applications (reserved nicknames, authorization requirements for using nicknames, whether certain nicknames can be prohibited, handling of duplicates, the relationship between nicknames and underlying identifiers such as SIP URIs or Jabber IDs, etc.).Entities that enforce the rules specified in this document are encouraged to be liberal in what they accept by following this procedure:Where possible, map characters (e.g, through width mapping, additional mapping, case mapping, or normalization) and accept the mapped string.If mapping is not possible (e.g., because a character is disallowed in the FreeformClass), reject the string.Implementation experience has shown that applying the rules for the Nickname profile is not an idempotent procedure for all code points. Therefore, implementations might need to apply the rules more than once to a nickname string.The IANA shall add the following entry to the PRECIS Profiles Registry:NicknameFreeformClassNicknames in messaging and text conferencing technologies; petnames for devices, accounts, and people; and other uses of nicknames or petnames.NoneNone (handled via NFKC)Map non-ASCII space characters to ASCII space, strip leading and trailing space characters, map interior sequences of multiple space characters to a single ASCII space.Map uppercase and titlecase code points to lowercase using the Unicode toLower() operation.NFKCNoneTo be specified by applications.RFC 7700 (this document)The security considerations described in apply to the FreeformClass string class used in this document for nicknames.The security considerations described in apply to the use of Unicode code points in nicknames. describes some of the security considerations related to visually similar characters, also called "confusable characters" or "confusables".Although the mapping rules defined in of this document are designed, in part, to reduce the possibility of confusion about nicknames, this document does not provide more-detailed recommendations regarding the handling of visually similar characters, such as those provided in .The Unicode StandardThe Unicode ConsortiumUnicode Technical Standard #39: Unicode Security MechanismsThe Unicode ConsortiumASCII format for network interchangeChatrooms within a Centralized Conferencing (XCON) SystemThe document "A Framework for Centralized Conferencing" defines a centralized conference as both signaling and protocol agnostic. The primary examples within this framework focus on audio and video as the media types for the session. This document provides an overview of the mechanisms defined in the centralized conferencing framework that can be used to support multi-user chat. In addition, the document describes additional functionality and requirements necessary to provide feature rich functionality.Multi-User Chatstpeter@jabber.orgUser Nicknamestpeter@jabber.orgvalerie.mercier@orange-ftgroup.comAn Introduction to Petname SystemsErratum ID 4570RFC ErrataThe following changes were made from .Addressed by removing the directionality rule and adding the normalization rule to Section 2.3.In accordance with working group discussions and updates to , removed the use of the Unicode CaseFold() operation in favor of the Unicode toLower() operation.Clarified several editorial matters.Updated references.Thanks to William Fisher for his implementation feedback, especially regarding idempotence.Thanks to Sam Whited for his feedback and for submitting .See for acknowledgements related to the specification that this document supersedes.