©
Dokumen ini menggunakan Manual laman web PHP Cina Lepaskan
(No version information available, might only be in Git)
stream_encoding — 设置数据流的字符集
$stream
[, string $encoding
] )本函数还未编写文档,仅有参数列表。
[#1] hajo at clansphere dot de [2009-06-19 15:46:19]
with php 5.2+ you can (should!) use the following line next to e.g. fopen() and specify the encoding of the content:
<?php
$charset = 'UTF-8';
stream_encoding($handle, $charset);
?>
in addition php 6 seems to need this since it triggers a notice level error if special chars must be converted and the above command is not specified (binary data excluded - just talkin bout clear text in this comment)