mirror of
https://github.com/php/php-src.git
synced 2024-09-29 05:46:06 +00:00
30a2bd1d11
This moves unicode conversion to the filter layer (rather than at the lower streams layer) unicode_filter.c has been moved from ext/unicode to main/streams as it's an integral part of the streams unicode conversion process. There are now three ways to set encoding on a stream: (1) By context $ctx = stream_context_create(NULL,array('encoding'=>'latin1')); $fp = fopen('somefile', 'r+t', false, $ctx); (2) By stream_encoding() $fp = fopen('somefile', 'r+'); stream_encoding($fp, 'latin1'); (3) By filter $fp = fopen('somefile', 'r+'); stream_filter_append($fp, 'unicode.from.latin1', STREAM_FILTER_READ); stream_filter_append($fp, 'unicode.to.latin1', STREAM_FILTER_WRITE); Note: Methods 1 and 2 are convenience wrappers around method 3. |
||
---|---|---|
.. | ||
buildconf.js | ||
config.w32 | ||
config.w32.h.in | ||
configure.tail | ||
confutils.js | ||
cvsclean.js | ||
deplister.c | ||
Makefile | ||
mkdist.php | ||
php.ico | ||
registersyslog.php | ||
template.rc | ||
wsyslog.mc |