1--TEST--
2Bug #70903 scandir wrongly interprets the Turkish "ı" character
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 . "testBug70903" . DIRECTORY_SEPARATOR;
20
21$d0 = $prefix . "ı";
22
23mkdir($prefix);
24
25mkdir($d0);
26
27get_basename_with_cp($d0, 65001);
28
29touch("$d0\\ı.txt");
30
31var_dump(count(stat("$d0\\ı.txt")) > 0);
32
33unlink("$d0\\ı.txt");
34
35rmdir($d0);
36
37rmdir($prefix);
38
39?>
40===DONE===
41--EXPECTF--
42Active code page: 65001
43getting basename of %s\ı
44string(2) "ı"
45bool(true)
46string(%d) "%s\ı"
47Active code page: %d
48bool(true)
49===DONE===
50