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
|
--TEST--
Bug #70903 scandir wrongly interprets the Turkish "ı" character
--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 . "testBug70903" . DIRECTORY_SEPARATOR;
$d0 = $prefix . "ı";
mkdir($prefix);
mkdir($d0);
get_basename_with_cp($d0, 65001);
touch("$d0\\ı.txt");
var_dump(count(stat("$d0\\ı.txt")) > 0);
unlink("$d0\\ı.txt");
rmdir($d0);
rmdir($prefix);
?>
--EXPECTF--
Active code page: 65001
getting basename of %s\ı
string(2) "ı"
bool(true)
string(%d) "%s\ı"
Active code page: %d
bool(true)
|