Bug #75063 [NEW]: Many filesystem-related functions do not work with multibyte file names
| From: | anrdaemon at freemail dot ru | Date: | Fri, 11 Aug 2017 10:14:33 +0000 |
| Subject: | Bug #75063 [NEW]: Many filesystem-related functions do not work with multibyte file names | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-210600@lists.php.net to get a copy of this message | ||
From: anrdaemon at freemail dot ru
Operating system: Windows
PHP version: 7.1.8
Package: Filesystem function related
Bug Type: Bug
Bug description:Many filesystem-related functions do not work with multibyte file names
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 bug report at https://bugs.php.net/bug.php?id=75063&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75063&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75063&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75063&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75063&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75063&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75063&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75063&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75063&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75063&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75063&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75063&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75063&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75063&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75063&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75063&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75063&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75063&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75063&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75063&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75063&r=mysqlcfg