1--TEST--
2Test fopen() for reading cp932 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();
10skip_if_wrong_cp(932, "ansi");
11
12?>
13--INI--
14default_charset=cp932
15--FILE--
16<?php
17/*
18#vim: set fileencoding=cp932
19#vim: set encoding=cp932
20*/
21
22include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc";
23
24$item = "�e�X�g�}���`�o�C�g�E�p�X"; // cp932 string
25$prefix = create_data("file_cp932", $item, 932);
26$fn = $prefix . DIRECTORY_SEPARATOR . $item;
27
28$f = fopen($fn, 'r');
29if ($f) {
30	var_dump($f, fread($f, 42));
31	var_dump(fclose($f));
32} else {
33	echo "open utf8 failed\n";
34}
35
36remove_data("file_cp932");
37
38?>
39===DONE===
40--EXPECTF--
41resource(%d) of type (stream)
42string(37) "reading file wihh multibyte filename
43"
44bool(true)
45===DONE===
46