cvs: php-src /ext/iconv/tests iconv_stream_filter.phpt
| From: | Moriyoshi Koizumi | Date: | Fri, 05 Dec 2003 18:39:04 +0000 |
| Subject: | cvs: php-src /ext/iconv/tests iconv_stream_filter.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-24964@lists.php.net to get a copy of this message | ||
moriyoshi Fri Dec 5 13:39:04 2003 EDT
Modified files:
/php-src/ext/iconv/tests iconv_stream_filter.phpt
Log:
A trivial implement for dos-like platforms
Index: php-src/ext/iconv/tests/iconv_stream_filter.phpt
diff -u php-src/ext/iconv/tests/iconv_stream_filter.phpt:1.1
php-src/ext/iconv/tests/iconv_stream_filter.phpt:1.2
--- php-src/ext/iconv/tests/iconv_stream_filter.phpt:1.1 Fri Dec 5 13:35:17 2003
+++ php-src/ext/iconv/tests/iconv_stream_filter.phpt Fri Dec 5 13:39:04 2003
@@ -6,20 +6,20 @@
iconv.internal_charset=iso-8859-1
--FILE--
<?php
-$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'r');
+$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb');
var_dump(bin2hex(fread($fp, 10)));
var_dump(bin2hex(fread($fp, 5)));
var_dump(bin2hex(fread($fp, 1)));
fclose($fp);
-$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'r');
+$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb');
stream_filter_append($fp, 'convert.iconv.ISO-2022-JP/EUC-JP');
var_dump(bin2hex(fread($fp, 10)));
var_dump(bin2hex(fread($fp, 5)));
var_dump(bin2hex(fread($fp, 1)));
fclose($fp);
-$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'r');
+$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb');
stream_filter_append($fp, 'string.rot13'); // this will make conversion fail.
stream_filter_append($fp, 'convert.iconv.ISO-2022-JP/EUC-JP');
var_dump(bin2hex(fread($fp, 10)));