1--TEST--
2Test fopen() for reading big5 to UTF-8 path
3--SKIPIF--
4<?php
5include dirname(__FILE__) . 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#vim: set fileencoding=big5
16#vim: set encoding=big5
17*/
18
19include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc";
20
21$item = iconv('big5', 'utf-8', "���զh�r�`���|"); // BIG5 string
22$prefix = create_data("file_big5", $item);
23$fn = $prefix . DIRECTORY_SEPARATOR . "$item";
24
25$f = fopen($fn, 'r');
26if ($f) {
27	var_dump($f, fread($f, 42));
28	var_dump(fclose($f));
29} else {
30	echo "open utf8 failed\n";
31}
32
33remove_data("file_big5");
34
35?>
36===DONE===
37--EXPECTF--
38resource(%d) of type (stream)
39string(%d) "reading file wihh multibyte filename
40"
41bool(true)
42===DONE===
43