Skip to content

fix(idna): keep ß for the TLDs that require non-transitional processing - #362

Merged
KaiSchwarz-cnic merged 2 commits into
masterfrom
RSRMID-3015-align-idna-tld-policy
Oct 19, 2026
Merged

KaiSchwarz-cnic merged 2 commits into
masterfrom
RSRMID-3015-align-idna-tld-policy

Conversation

@KaiSchwarz-cnic

@KaiSchwarz-cnic KaiSchwarz-cnic commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Part of RSRMID-3015: aligning every IDN translator with idna-uts46's TLD policy — .art .be .ca .de .swiss .fr .pm .re .tf .wf .yt keep the deviation characters (faß.de → xn--fa-hia.de), every other TLD maps them (faß.com → fass.com). The same branch is open in python-sdk, java-sdk, go-sdk, php-sdk, php-idna-translator and idna-uts46.

is_transitional_processing() returned True for exactly the TLDs in NON_TRANSITIONAL_TLDS, so faß.de was sent as fass.de — a different registration. Now negated and case-insensitive.

Breaking: BREAKING CHANGE footer → v6.0.0. Callers who need the old result pass use_transitional explicitly.

Tests were traced by hand only (no Python in the workspace container); this CI run is their first execution.

🤖 Generated with Claude Code

…he rest

Rename the two transitional tests to what they assert, and add
direction-neutral tests: faß.<tld> must differ from faß.com for every TLD
in NON_TRANSITIONAL_TLDS, and the explicit use_transitional override must
win regardless of TLD. The .de test pins the current, inverted result and
is expected to change with the fix.

Refs: RSRMID-3015
is_transitional_processing() returned True for exactly the TLDs listed in
NON_TRANSITIONAL_TLDS, so faß.de was sent as fass.de, a different domain,
while faß.com became xn--fa-hia.com. It now matches idna-uts46 and
php-idna-translator: the listed TLDs keep the deviation characters, every
other TLD maps them, and the TLD is matched case-insensitively.

BREAKING CHANGE: IDNAConverter.convert() and IDNAProcessor.to_ascii() now
return xn--fa-hia.de for faß.de (was fass.de) and fass.com for faß.com (was
xn--fa-hia.com); the same applies to ς, ZWJ and ZWNJ under these TLDs.
Callers that need the previous result pass use_transitional explicitly.

Refs: RSRMID-3015
@KaiSchwarz-cnic
KaiSchwarz-cnic merged commit 618d8a4 into master Oct 19, 2026
7 checks passed
@KaiSchwarz-cnic
KaiSchwarz-cnic deleted the RSRMID-3015-align-idna-tld-policy branch October 19, 2026 19:51
@KaiSchwarz-cnic

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant