Advertisement
Data Processing

The Two Alphabets: One Domain, Written in Two Official Scripts

An internationalized domain name lives twice. It exists as the name people read, written in the characters of a human language, and as the name the D...

An internationalized domain name lives twice. It exists as the name people read, written in the characters of a human language, and as the name the DNS actually carries, an ASCII encoding of the same label. Both forms are official, both are lossless, and as strings they share almost nothing. In a measured set of 300 domains containing non-ASCII characters, one source stored the Unicode form and the other stored the Punycode form, and an exact match between the two sources hit 0 of 300 records (Source: batch 16 SD measurement results, group AG4). After the Punycode form was decoded through IDNA, the same match recovered to 300 of 300 (Source: batch 16 SD measurement results, group AG4).

What The Two Alphabets means

The two alphabets is the condition of a domain name that circulates in both of its official representations at once: the Unicode form, often called the U-label, which people type and read, and the Punycode form, the A-label, which begins with the xn-- prefix and is what the DNS resolves. In the measured set, all 300 domains contained non-ASCII characters, source A stored the Unicode form of each, and source B stored the Punycode form, with 300 of 300 of source B's values carrying the xn-- prefix (Source: batch 16 SD measurement results, group AG4). Exact matching between the sources hit 0 of 300, a failure of 100 percent (Source: batch 16 SD measurement results, group AG4). The concept applies to any join, de-duplication, or blocklist comparison over domain names drawn from more than one system. It does not apply to misspellings or homoglyph lookalikes; nothing here is wrong or damaged. The two strings are two correct spellings of one name, issued by the same standard.

The nearest neighbour is The Expanded Accent, and the difference has to be stated carefully. In The Expanded Accent, two transliteration conventions for personal names, expansion and stripping, each produced correct keys from the same name, and the keys met almost nowhere; the failure there was a disagreement between two human conventions for folding accented letters into ASCII, neither reversible in general, since a stripped letter cannot announce what accent it lost. The two alphabets involves no folding decision at all. The Unicode and Punycode forms are a single standard's pair of representations, and the mapping between them is exact and reversible: IDNA decoding returned every one of the 300 Punycode forms to its Unicode counterpart, restoring the match to 300 of 300 with nothing guessed (Source: batch 16 SD measurement results, group AG4). Where the expanded accent needs both sides to agree on a rule, the two alphabets needs only the decode the standard already defines.

Three Hundred Domains, Zero String Overlap

The measured failure was total, and its totality is structural. Every domain in the set contained at least one non-ASCII character (Source: batch 16 SD measurement results, group AG4), which means every Punycode form differed from its Unicode form along its whole length: the xn-- prefix alone, present in 300 of 300 encoded values (Source: batch 16 SD measurement results, group AG4), guarantees that no encoded string can equal its readable counterpart. An exact match therefore hit 0 of 300 (Source: batch 16 SD measurement results, group AG4), not because the matcher was weak but because the two alphabets genuinely share no strings.

The consequences reach every routine operation built on domain strings. De-duplication sees every internationalized domain twice. A join between an A-label traffic log and a U-label customer table returns empty for the international segment. A blocklist check fails in the dangerous direction: a domain blocked in one alphabet sails through a check performed in the other. Nothing errors; the strings simply never meet.

The Two Alphabets: One Domain, Written in Two Official Scripts

The Prefix Is the Confession

One mercy distinguishes this failure from subtler mismatches: the encoded form announces itself. Every Punycode label carries the xn-- prefix, and in the measured set that marker appeared in 300 of 300 of source B's values (Source: batch 16 SD measurement results, group AG4). A pipeline can therefore detect the condition mechanically, scanning for the prefix, rather than discovering it through a mysteriously empty join.

The repair itself is the standard's own operation. IDNA decoding maps each A-label back to its U-label exactly, and in the measurement that single step moved the match from 0 of 300 to 300 of 300 (Source: batch 16 SD measurement results, group AG4). Encoding runs just as deterministically in the other direction, so a pipeline may canonicalize on either alphabet; what it may not do is compare across them. The full name survives inside the encoding, which is why the recovery is complete rather than statistical.

How The Two Forms Were Measured

For this test the laboratory was a script, not a registrar. Working from synthetic material only, the program assembled 300 invented domain names by pairing ten stems that carry accented or umlauted letters with running numbers, guaranteeing non-ASCII characters in every name (Source: batch 16 SD measurement results, group AG4). Determinism came from seed 42. Each name was written twice: once readably, in Unicode, for the first source, and once through IDNA encoding, in Punycode, for the second. A check confirmed that all 300 encoded spellings opened with the xn-- marker (Source: batch 16 SD measurement results, group AG4). Comparing the unconverted columns produced no hits at all, 0 of 300; decoding the Punycode column first produced a complete recovery, 300 of 300. Because every record was fabricated, no commercial product was measured and no vendor receives a rating.

Questions, answered

Which alphabet should a system canonicalize on?

Either, provided the choice is declared and applied at every boundary. The failure lives entirely in the mixture: exact matching hit 0 of 300 across the two forms and 300 of 300 once one side was decoded (Source: batch 16 SD measurement results, group AG4). Systems that interoperate with the DNS often store the A-label and render the U-label for display; review tools often do the reverse. Comparing unconverted strings does not.

How can a pipeline detect this condition before a join fails?

Look for the xn-- prefix. In the measured set, 300 of 300 Punycode values carried it (Source: batch 16 SD measurement results, group AG4), because the prefix is part of the encoding standard, not an optional marker. A profile that finds the prefix saturating one source and absent from another has found the two alphabets before they produce an empty join.

Is a Punycode form a damaged or corrupted domain?

No. It is the form the DNS actually resolves, produced by a lossless encoding, and IDNA decoding recovered the Unicode form for all 300 measured domains (Source: batch 16 SD measurement results, group AG4). The only defect in the measured run was comparing the two forms as if they were one.

Does this affect domains written in plain ASCII?

Not in this construction. The measured set was built so that all 300 domains contained non-ASCII characters (Source: batch 16 SD measurement results, group AG4), and a purely ASCII domain has identical forms, so it matches under either storage choice. That is also the trap for testing: an ASCII-dominated sample will certify a cross-source join as healthy while the internationalized segment matches at 0 of 300 (Source: batch 16 SD measurement results, group AG4).

Could fuzzy matching bridge the two forms instead of decoding?

It would be the wrong tool. The two forms can differ along their entire length, so similarity scores are weak exactly where the relationship is certain. The relationship is identity under a defined encoding, and IDNA decoding exploits it directly, which is why it restored 300 of 300 matches rather than a probable subset (Source: batch 16 SD measurement results, group AG4).

Summary

The two alphabets is the split personality of the internationalized domain name: one name, two official representations, and no string in common between them. In the batch 16 synthetic measurement, 300 domains containing non-ASCII characters were stored in Unicode form by one source and in Punycode form by another, every encoded value carrying the xn-- prefix; exact matching hit 0 of 300, and IDNA decoding restored the match to 300 of 300 (Source: batch 16 SD measurement results, group AG4). Unlike The Expanded Accent, where two conventions fold information away differently, nothing here is lost; the standard itself supplies the bridge. Declare one alphabet as canonical, decode at the boundary, and treat a prefix-saturated column as an instruction to convert, never as data to compare raw.

Sources

Know someone who needs this? Share it.

Advertisement