stream_encoding

(No version information available, might only be in Git)

stream_encodingSet character set for stream encoding

설명

bool stream_encoding ( resource $stream [, string $encoding ] )
Warning

이 함수는 현재 문서화 되어있지 않습니다; 인수 목록만을 제공합니다.

add a note add a note

User Contributed Notes 1 note

up
3
hajo at clansphere dot de
15 years ago
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)
To Top