1--TEST-- 2Bug #61315 stat() fails with specific DBCS characters 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 . "testBug61315" . DIRECTORY_SEPARATOR; 20 21$d0 = $prefix . "ソフト"; 22$d1 = $prefix . "フォルダ"; 23 24mkdir($prefix); 25 26mkdir($d0); 27mkdir($d1); 28 29get_basename_with_cp($d0, 65001); 30get_basename_with_cp($d1, 65001); 31 32touch("$d0\\test0.txt"); 33touch("$d1\\test1.txt"); 34 35var_dump(count(stat("$d0\\test0.txt")) > 0); 36var_dump(count(stat("$d0\\test0.txt")) > 0); 37 38unlink("$d0\\test0.txt"); 39unlink("$d1\\test1.txt"); 40 41rmdir($d0); 42rmdir($d1); 43 44rmdir($prefix); 45 46?> 47===DONE=== 48--EXPECTF-- 49Active code page: 65001 50getting basename of %s\ソフト 51string(9) "ソフト" 52bool(true) 53string(%d) "%s\ソフト" 54Active code page: %d 55Active code page: 65001 56getting basename of %s\フォルダ 57string(12) "フォルダ" 58bool(true) 59string(%d) "%s\フォルダ" 60Active code page: %d 61bool(true) 62bool(true) 63===DONE=== 64