|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78671 idn-to-utf8 : Encoding failure for lion symbol
Submitted: 2019-10-14 09:28 UTC Modified: 2019-10-14 14:44 UTC
From: thb at metanet dot ch Assigned: cmb (profile)
Status: Not a bug Package: idn (PECL)
PHP Version: 7.3.10 OS: LINUX
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
45 + 10 = ?
Subscribe to this entry?

 [2019-10-14 09:28 UTC] thb at metanet dot ch
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 = '';
$idnaInfo = [];
$decoded = idn_to_utf8($string, 0, INTL_IDNA_VARIANT_UTS46, $idnaInfo);
if ($decoded === false) {
    echo 'Test failed.'.PHP_EOL.PHP_EOL;
} else {
    echo 'Test was ok.'.PHP_EOL;

Expected result:
Test was ok.

Actual result:
Test failed. array(3) { ["result"]=> string(27) "xn--sindmiregal-6o08j�.ws" ["isTransitionalDifferent"]=> bool(false) ["errors"]=> int(1024) } 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-10-14 11:04 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2019-10-14 11:04 UTC]
Hmm, can't reproduce on <>.  This might be
an ICU issue.  Which version do you use (see phpinfo)?
 [2019-10-14 12:16 UTC] thb at metanet dot ch
ICU Version = 50.1.2
 [2019-10-14 13:06 UTC]
Thanks!  Is it 50.1.2 for *both* 7.3.9 and 7.3.10?
 [2019-10-14 14:33 UTC] thb at metanet dot ch
for the PHP-7.3.9 instance (another PC) it is

    ICU Version : 63.1 

(... interesting...)
 [2019-10-14 14:44 UTC]
-Status: Feedback +Status: Not a bug
 [2019-10-14 14:44 UTC]
Thanks!  Looks like the issue is caused by the rather old ICU
50.1.2 (released 2012-12-17).  I'm closing this ticket as not a
 [2019-10-14 15:04 UTC] thb at metanet dot ch
okay, that was a very valuable hint.
Thank you very much!
I suggest closing this Bug report.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 07:01:30 2024 UTC