title: set utf-8 encoding for fread fwrite
body: <p>hi i use this code read and write text in file . </p>
  
  <pre><code>$d = fopen("chat.txt", "r");
   $content=fread($d,filesize('chat.txt'));
   $bn=explode('||',$content);
   foreach($bn as $bn)
   echo $bn.'&lt;br&gt;';
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$d = fopen("chat.txt", "a");
   $c=$_GET['c'];
   if($c=='') die();
   fwrite($d,$c.'||');
   fclose($d);
  </code></pre>
  
  <p>but in =ie only= utf-8 character show "?" or "[]" . my encoding Utf-8 Without BOM 
  and i use this </p>
  
  <pre><code>header('Content-type: text/html; charset=UTF-8');
  </code></pre>
  
  <p>and This : </p>
  
  <pre><code>&lt;meta http-equiv="content-type" content="text/html; charset=utf-8" /&gt;
  </code></pre>
  
  <p>my defult encoding in php.ini is utf-8 but yet show ? .
  i see chat.txt file and character right in file but when with ie save in file And when show in page show "?" instead of right .</p>