Bug #73877 [Opn->Fbk]: readlink() returns garbage for UTF paths
| From: | ab@php.net | Date: | Fri, 06 Jan 2017 19:51:08 +0000 |
| Subject: | Bug #73877 [Opn->Fbk]: readlink() returns garbage for UTF paths | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206331@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73877&edit=1
ID: 73877
Updated by: ab@php.net
Reported by: kulakov74 at yandex dot ru
Summary: readlink() returns garbage for UTF paths
-Status: Open
+Status: Feedback
Type: Bug
Package: Filesystem function related
Operating System: Windows 8.1
PHP Version: 7.1.0
Block user comment: N
Private report: N
New Comment:
Thanks for the report. Double quotes will lead to the backslash extrapolation, backslash need to be
escaped therefore. Need also to know, what kind of link is that? Also - is the string passed UTF-8
encoded? Could you provide maybe an exact mklink command or alike, to get the reproducer? I've
just tried with a junction and see no issue.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2017-01-05 23:42:41] kulakov74 at yandex dot ru
Description:
------------
I work in CLI on Windows.
After they finally 'Fixed UTF-8 and long path support on Windows' in PHP 7.1.0 I installed
it and after changing default_charset to UTF-8 things seem to work, but when I call readlink() with
Cyrillic paths it returns the same path cut somewhere near the end with a garbage character added.
For example:
"C:\Users\СеÑÑжка" -> "C:\Users\СеÑ�"
readlink() is supposed to return the same path for regular directories, which it does for ones not
having UTF characters.
Test script:
---------------
$FullName="C:\Users\СеÑÑжка";
echo(readlink($FullName));
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73877&edit=1