Repository navigation
fix(idna): keep ß for the TLDs that require non-transitional processing - #362
Merged
Merged
Conversation
…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
Contributor
Author
|
🎉 This PR is included in version 6.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of RSRMID-3015: aligning every IDN translator with idna-uts46's TLD policy —
.art .be .ca .de .swiss .fr .pm .re .tf .wf .ytkeep 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()returnedTruefor exactly the TLDs inNON_TRANSITIONAL_TLDS, sofaß.dewas sent asfass.de— a different registration. Now negated and case-insensitive.Breaking:
BREAKING CHANGEfooter → v6.0.0. Callers who need the old result passuse_transitionalexplicitly.Tests were traced by hand only (no Python in the workspace container); this CI run is their first execution.
🤖 Generated with Claude Code