|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2019-10-14 09:28 UTC] thb at metanet dot ch
Description:
------------
If a domain name decodes to something having a lion symbol in front of the result string, idn-to-utf8 fails to decode it. This was not the case in PHP 7.3.9 and is not the case with deprecated INTL_IDNA_VARIANT_2003 .
Test script:
---------------
$string = 'xn--sindmiregal-6o08j.ws';
$idnaInfo = [];
$decoded = idn_to_utf8($string, 0, INTL_IDNA_VARIANT_UTS46, $idnaInfo);
if ($decoded === false) {
echo 'Test failed.'.PHP_EOL.PHP_EOL;
var_dump($idnaInfo);
} else {
echo 'Test was ok.'.PHP_EOL;
}
exit;
Expected result:
----------------
Test was ok.
Actual result:
--------------
Test failed. array(3) { ["result"]=> string(27) "xn--sindmiregal-6o08j�.ws" ["isTransitionalDifferent"]=> bool(false) ["errors"]=> int(1024) }
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 15:00:01 2025 UTC |
for the PHP-7.3.9 instance (another PC) it is ICU Version : 63.1 (... interesting...)