1--TEST-- 2Bug #54977 UTF-8 files and folder are not shown 3--SKIPIF-- 4<?php 5include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; 6 7skip_if_not_win(); 8if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); 9skip_if_no_required_exts(); 10 11?> 12--FILE-- 13<?php 14 15/* This file is in UTF-8. */ 16 17include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; 18 19$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug54977" . DIRECTORY_SEPARATOR; 20 21$paths = array("多国語", "王", "汚れて掘る"); 22 23mkdir($prefix); 24foreach ($paths as $d) { 25 mkdir($prefix . $d); 26 file_put_contents($prefix . $d . ".test", $d); 27} 28 29$myDirectory = opendir($prefix); 30while($entryName = readdir($myDirectory)) { 31 echo get_basename_with_cp($prefix . $entryName, 65001, false) . "\n"; 32} 33closedir($myDirectory); 34 35foreach ($paths as $d) { 36 rmdir($prefix . $d); 37 unlink($prefix . $d . ".test"); 38} 39rmdir($prefix); 40 41?> 42--EXPECT-- 43testBug54977 44windows_mb_path 45多国語 46多国語.test 47汚れて掘る 48汚れて掘る.test 49王 50王.test 51