1--TEST-- 2Test fopen() for reading CP1251 with zend.multibyte 3--EXTENSIONS-- 4mbstring 5--INI-- 6zend.multibyte=1 7zend.script_encoding=cp1251 8--SKIPIF-- 9<?php 10include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; 11 12skip_if_not_win(); 13if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); 14skip_if_no_required_exts(); 15 16?> 17--CONFLICTS-- 18file_cp1251 19--FILE-- 20<?php 21/* 22#vim: set fileencoding=cp1251 23#vim: set encoding=cp1251 24*/ 25 26include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; 27 28$item = "������"; // cp1251 string 29$prefix = create_data("file_cp1251", $item); 30$fn = $prefix . DIRECTORY_SEPARATOR . $item; 31 32$f = fopen($fn, 'r'); 33if ($f) { 34 var_dump($f, fread($f, 42)); 35 var_dump(fclose($f)); 36} else { 37 echo "open failed\n"; 38} 39 40remove_data("file_cp1251"); 41 42?> 43--EXPECTF-- 44resource(%d) of type (stream) 45string(35) "opened an utf8 filename for reading" 46bool(true) 47