|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74934 ScanDir Have Problem with UTF8 Character
Submitted: 2017-07-17 07:05 UTC Modified: 2017-07-18 10:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: global dot ninety at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.6.31 OS: Win8/Ubuntu/CentOS
Private report: No CVE-ID: None
 [2017-07-17 07:05 UTC] global dot ninety at gmail dot com
scandir Have Problem with UTF8 Character

and so on: DirectoryIterator / opendir / readdir

i tested in PHP5.6/7.0

The system cannot find the file specified. (code: 2)

To fix the problem temporarily i use ext WFIO (

Test script:
$folder = '61-تست تست';
$path    = 'files/'.$folder;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-07-18 10:22 UTC]
-Status: Open +Status: Not a bug
 [2017-07-18 10:22 UTC]
Thanks for the report. For the Windows part - these issues are fixed in PHP 7.1, please also check UPGRADING. On other platforms, it is much a topic of system configuration and process locale, not about PHP itself.

 [2017-07-20 20:50 UTC] global dot ninety at gmail dot com
i have this problem

i have linux host from HostUpon.

System: Linux 2.6.32-673.8.1.lve1.4.3.el6.x86_64 #1 SMP Wed Feb 10 08:57:30 EST 2016 x86_64 
PHP Version: 7.1.7

how to fix this??
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 29 01:01:24 2023 UTC