1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
--TEST--
Bug #61315 stat() fails with specific DBCS characters
--SKIPIF--
<?php
include __DIR__ . DIRECTORY_SEPARATOR . "util.inc";
skip_if_not_win();
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
skip_if_no_required_exts();
?>
--FILE--
<?php
/* This file is in UTF-8. */
include __DIR__ . DIRECTORY_SEPARATOR . "util.inc";
$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug61315" . DIRECTORY_SEPARATOR;
$d0 = $prefix . "ソフト";
$d1 = $prefix . "フォルダ";
mkdir($prefix);
mkdir($d0);
mkdir($d1);
get_basename_with_cp($d0, 65001);
get_basename_with_cp($d1, 65001);
touch("$d0\\test0.txt");
touch("$d1\\test1.txt");
var_dump(count(stat("$d0\\test0.txt")) > 0);
var_dump(count(stat("$d0\\test0.txt")) > 0);
unlink("$d0\\test0.txt");
unlink("$d1\\test1.txt");
rmdir($d0);
rmdir($d1);
rmdir($prefix);
?>
--EXPECTF--
Active code page: 65001
getting basename of %s\ソフト
string(9) "ソフト"
bool(true)
string(%d) "%s\ソフト"
Active code page: %d
Active code page: 65001
getting basename of %s\フォルダ
string(12) "フォルダ"
bool(true)
string(%d) "%s\フォルダ"
Active code page: %d
bool(true)
bool(true)
|