Bug #75063 [Opn->Fbk]: Many filesystem-related functions do not work with multibyte file names

From: Date: Fri, 11 Aug 2017 10:40:16 +0000
Subject: Bug #75063 [Opn->Fbk]: Many filesystem-related functions do not work with multibyte file names
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210601@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75063&edit=1 ID: 75063 Updated by: requinix@php.net Reported by: anrdaemon at freemail dot ru Summary: Many filesystem-related functions do not work with multibyte file names -Status: Open +Status: Feedback Type: Bug Package: Filesystem function related Operating System: Windows PHP Version: 7.1.8 Block user comment: N Private report: N New Comment: Works for me. Are you sure you saved the file in UTF-8 format? Previous Comments: ------------------------------------------------------------------------ [2017-08-11 10:14:29] anrdaemon at freemail dot ru Description: ------------ Many filesystem functions that read, write or otherwise deal with file names are unable to work with multibyte encoded filenames, such as when internal_encoding is equal to UTF-8. Even the example in https://php.net/opendir doesn't work, if a path contains multibyte sequences. Test script: --------------- <?php print ini_get("internal_encoding") . "\n"; print ini_get("default_charset") . "\n"; foreach(["test", "тест"] as $fn) file_put_contents("$fn.txt", ""); print_r(glob("*.txt")); Expected result: ---------------- $ php -nf ./xx.php UTF-8 Array ( [0] => test.txt [1] => тест.txt ) Actual result: -------------- $ php -nf ./xx.php UTF-8 Array ( [0] => test.txt ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75063&edit=1

« previous php.bugs (#210601) next »