rfc-5893

Right-to-Left Scripts for Internationalized Domain Names for Applications (IDNA)

H. Alvestrand (Editor), C. Karp
date2010-08 streamIETF areaapp wgidnabis statusPROPOSED STANDARD pages17 canonicalhttps://www.rfc-editor.org/rfc/rfc5893 doi10.17487/RFC5893
The use of right-to-left scripts in Internationalized Domain Names (IDNs) has presented several challenges. This memo provides a new Bidi rule for Internationalized Domain Names for Applications (IDNA) labels, based on the encountered problems with some scripts and some shortcomings in the 2003 IDNA Bidi criterion. [STANDARDS-TRACK]

Extracted elements (23)

design-rationale §3

The Bidi rule is stated strictly in terms of Unicode Bidi properties rather than character repertoires, so that the rule can be validated algorithmically and is not tied to any specific script. Two explicit goals are Label Uniqueness and Character Grouping under the Unicode Bidi algorithm.

dns

design-rationale §6

The Bidi rule was not extended to prevent mixing of digits from different scripts (e.g., Bengali and Gujarati digits, both Bidi class L). Such restrictions are left to registries or script communities to define at the registry level.

dns, registry

design-rationale §3

The document explicitly rejected a requirement that 'no two domain names should be displayed the same under differing directionality', showing it is unsound: 'ABC.abc' and 'abc.ABC' swap display representations between LTR and RTL contexts but both can be legitimate registrations.

dns

design-rationale §5

The IDNABIS WG decided not to require that labels following an RTL label also satisfy the Bidi rule, because ASCII domain names starting with digits cannot be invalidated, IDNA processing may occur before zone-suffix appending, DNAME redirections can introduce unsafe labels, and wildcards can generate names the zone owner cannot control.

dns

design-rationale §1.2

The RFC 3454 (IDNA2003) Bidi rule required that a RandALCat character be both the first and last character of a string. This made entire languages invalid as IDN labels; for Dhivehi (Thaana script), every word ends with a Nonspacing Mark (NSM), which is not R or AL, so all Dhivehi words were forbidden.

dns

design-rationale §4.3

The RFC 3454 rule prohibited RTL strings from ending with a digit. The strings 'ALEF 5' and '5 ALEF' display identically in an LTR context, so only one should be permitted; the new rule addresses this by allowing EN/AN at the end of RTL labels while requiring EN and AN not to coexist.

dns

design-rationale §7.1

The specification does not forbid leading European digits in ASCII-only labels to avoid invalidating a large installed base of such labels and to limit scope to RTL labels only. Registries are recommended to disallow RTL label registration in zones where the parent label begins with a digit.

dns, registry

design-rationale §4.2

Yiddish (Hebrew script) uses combining points (NSM characters) in word-final position. The IDNA2003 requirement that RTL strings end with an R/AL character rejected valid Yiddish words such as the YIVO acronym ending in HEBREW POINT QAMATS (NSM).

dns

interoperability-note §6

A domain name with mixed-direction labels (e.g., R1.R2.ltr in network order) will display as '2R.1R.ltr' in an LTR context due to the Unicode Bidi algorithm, which may surprise users expecting hierarchical order. This document does not propose a solution.

dns

interoperability-note §2

In a domain name consisting of only labels that satisfy the Bidi rule, the Label Uniqueness and Character Grouping requirements are satisfied. For domain names mixing LDH labels with Bidi-rule-satisfying labels, the requirements are satisfied as long as a label starting with an ASCII digit does not come after a right-to-left label.

dns

interoperability-note §7.1

Old programs implementing RFC 3454 Bidi checks will refuse some newly allowed labels (those ending in NSM) or fall back to displaying them in A-label form. Programs that examine the last character to determine directionality may display newly allowed labels incorrectly.

dns

interoperability-note §7.2

The validity of any label under this rule depends on Unicode Bidi property values, which are not declared immutable by the Unicode Consortium. Future Unicode versions may change Bidi properties of characters, potentially changing the validity of previously valid or invalid labels.

dns

normative-requirement §2 MUST

In an LTR label, only characters with Bidi properties L, EN, ES, CS, ET, ON, BN, or NSM are allowed.

dns

normative-requirement §2 MUST

In an LTR label, the end of the label MUST be a character with Bidi property L or EN, followed by zero or more characters with Bidi property NSM.

dns

normative-requirement §2 MUST

In an RTL label, if an EN (European Number) is present, no AN (Arabic Number) may be present, and vice versa.

dns

normative-requirement §2 MUST

In an RTL label, only characters with Bidi properties R, AL, AN, EN, ES, CS, ET, ON, BN, or NSM are allowed.

dns

normative-requirement §2 MUST

In an RTL label, the end of the label MUST be a character with Bidi property R, AL, EN, or AN, followed by zero or more characters with Bidi property NSM.

dns

normative-requirement §2 MUST

The first character of any label in a Bidi domain name MUST have Bidi property L, R, or AL. If R or AL, the label is RTL; if L, the label is LTR.

dns

protocol-element §1.4

A Bidi domain name is a domain name that contains at least one RTL label. This includes domain names containing only dots and right-to-left characters.

dns

protocol-element §1.4

An RTL label is a label that contains at least one character of Unicode Bidi type R, AL, or AN. An LTR label is any label that is not an RTL label.

dns

protocol-element §1.4

The Unicode Bidi property values used by the rule are: L (left-to-right), R (right-to-left), AL (Arabic letter), EN (European number), ES (European number separator), ET (European number terminator), AN (Arabic number), CS (common number separator), NSM (nonspacing mark), BN (boundary neutral), ON (other neutrals). Directional control characters (LRE, LRO, RLE, RLO, PDF) are not used in IDNA labels.

dns

security-consideration §8

Mixed-direction text display can be surprising: cut-and-paste of a domain name into a different directionality context may cause it to display differently, and inserting a character can shift the display position of distant characters. This is not specific to domain names.

security, dns

security-consideration §8

The new IDNA2008 Bidi rules allow some strings that IDNA2003 forbade. Differences in label interpretation between IDNA2003 and IDNA2008 implementations could pose a security risk, though no specific attack is identified. Hash computations over identifiers should use network order and are unaffected.

security, dns