Convert non-ASCII TLD filenames to Punycode in public-suffix data#1689
Merged
henriquemoody merged 1 commit into3.0from Feb 9, 2026
Merged
Convert non-ASCII TLD filenames to Punycode in public-suffix data#1689henriquemoody merged 1 commit into3.0from
henriquemoody merged 1 commit into3.0from
Conversation
Copilot
AI
changed the title
[WIP] Fix installation failure due to non-ASCII filenames
Convert non-ASCII TLD filenames to Punycode in public-suffix data
Feb 9, 2026
henriquemoody
requested changes
Feb 9, 2026
Member
henriquemoody
left a comment
There was a problem hiding this comment.
Install symfony/polyfill-intl-idn as a dependency so users don't need to have intl installed
Contributor
Author
Added in 6483a2b. The polyfill ensures |
6483a2b to
ff4631b
Compare
Some systems and tools (e.g., certain archive extractors, Windows environments, or CI pipelines) do not properly handle non-ASCII characters in file paths. The public suffix data files for internationalized TLDs (such as ישראל, СРБ, 香港, and ไทย) were stored using their native Unicode names, which caused installation failures on those systems. This commit converts those filenames to their Punycode equivalents (e.g., XN--4DBRK0CE.php instead of ישראל.php) using `idn_to_ascii()`. Both the data generation command (`UpdateDomainSuffixesCommand`) and the runtime validator (`PublicDomainSuffix`) are updated to use the same Punycode-based file lookup, ensuring consistency. A polyfill dependency (`symfony/polyfill-intl-idn`) is added so that `idn_to_ascii()` is available even when the `intl` PHP extension is not installed. Assisted-by: Claude Code (Claude Opus 4.6) Co-authored-by: Henrique Moody <henriquemoody@gmail.com>
ff4631b to
ce50d33
Compare
henriquemoody
approved these changes
Feb 9, 2026
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.
Installation fails on platforms where
unzipdoesn't handle Unicode filenames in ZIP archives (notably macOS). The public suffix data contains files named香港.php,ไทย.php,ישראל.php, andСРБ.php.Changes
Renamed data files to uppercase Punycode equivalents:
香港.php→XN--J6W193G.phpไทย.php→XN--O3CW4H.phpישראל.php→XN--4DBRK0CE.phpСРБ.php→XN--90A3AC.phpPublicDomainSuffixvalidator: Convert TLD to Punycode before loading data file usingidn_to_ascii():UpdateDomainSuffixesCommand: Generate Punycode filenames for non-ASCII TLDs to ensure future updates from Mozilla's public suffix list maintain compatibility.Added
symfony/polyfill-intl-idndependency: Ensuresidn_to_ascii()function is available even when the PHPintlextension is not installed, providing a pure PHP fallback implementation.International domain validation continues to work transparently (e.g.,
ทหาร.ไทย,個人.香港).Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.