1--TEST--
2Test mkdir/rmdir cp1252 to UTF-8 path
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--CONFLICTS--
13dir2_cp1252
14--FILE--
15<?php
16/*
17#vim: set fileencoding=cp1252
18#vim: set encoding=cp1252
19*/
20
21include __DIR__ . DIRECTORY_SEPARATOR . "util.inc";
22
23$item = iconv('cp1252', 'utf-8', "Vol��ao"); // cp1252 string
24$prefix = create_data("dir2_cp1252", "${item}3");
25$path = $prefix . DIRECTORY_SEPARATOR . "${item}3";
26
27$subpath = $path . DIRECTORY_SEPARATOR . "${item}4";
28
29/* The mb dirname exists*/
30var_dump(file_exists($path));
31
32var_dump(mkdir($subpath));
33var_dump(file_exists($subpath));
34
35get_basename_with_cp($subpath, 65001);
36
37var_dump(rmdir($subpath));
38remove_data("dir2_cp1252");
39
40?>
41--EXPECTF--
42bool(true)
43bool(true)
44bool(true)
45Active code page: 65001
46getting basename of %s\Voláçao3\Voláçao4
47string(10) "Voláçao4"
48bool(true)
49string(%d) "%s\Voláçao3\Voláçao4"
50Active code page: %d
51bool(true)
52