1--TEST--
2Test fopen() for reading cp1253 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--
13file_cp1253
14--FILE--
15<?php
16/*
17#vim: set fileencoding=cp1253
18#vim: set encoding=cp1253
19*/
20
21include __DIR__ . DIRECTORY_SEPARATOR . "util.inc";
22
23$item = "διαδρομή δοκιμής";
24$prefix = create_data("file_cp1253", $item);
25$fn = $prefix . DIRECTORY_SEPARATOR . $item;
26
27$f = fopen($fn, 'r');
28if ($f) {
29    var_dump($f, fread($f, 42));
30    var_dump(fclose($f));
31} else {
32    echo "open utf8 failed\n";
33}
34
35remove_data("file_cp1253");
36
37?>
38--EXPECTF--
39resource(%d) of type (stream)
40string(37) "reading file wihh multibyte filename
41"
42bool(true)
43