|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-01-05 23:42 UTC] 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)); PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 14:00:01 2025 UTC |
Yes, thank you, but in this particular case it doesn't matter - everything works the same way with "\\". And sorry, I didn't make it quite clear: in my case, the directory is NOT a link, so readlink() should return the dir, not a target, but it DOESN'T, so my script thinks it IS A LINK. So no mklink command had been used. I use ini_set('default_charset', 'UTF-8'); and then I get the dir from opendir()/readdir(), so it should be UTF-8.