Skip to content

Commit eedce8f

Browse files
Use Punycode filenames for non-ASCII TLD suffix data files
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>
1 parent ddb5ef6 commit eedce8f

8 files changed

Lines changed: 213 additions & 198 deletions

File tree

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"psr/container": "^2.0",
2626
"respect/string-formatter": "^1.6",
2727
"respect/stringifier": "^3.0",
28+
"symfony/polyfill-intl-idn": "^1.33",
2829
"symfony/polyfill-mbstring": "^1.33"
2930
},
3031
"require-dev": {

0 commit comments

Comments
 (0)