title: file_get_contents() converts UTF-8 to ISO-8859-1
body: <p>I am trying to get search results from <a href="http://yahoo.com" rel="nofollow">yahoo.com</a>. </p>
  
  <p><strong>But</strong> file_get_contents() converts UTF-8 charset (charset, that yahoo uses) content to ISO-8859-1.</p>
  
  <p>Try:</p>
  
  <pre><code>$filename = "http://search.yahoo.com/search;_ylt=A0oG7lpgGp9NTSYAiQBXNyoA?p=naj%C5%A1%C5%A5astnej%C5%A1%C3%AD&amp;fr2=sb-top&amp;fr=yfp-t-701&amp;type_param=&amp;rd=pref";
  
  echo file_get_contents($filename);
  </code></pre>
  
  <p>Scripts as </p>
  
  <pre><code>header('Content-Type: text/html; charset=UTF-8');
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$er = mb_convert_encoding($filename , 'UTF-8');
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$s2 = iconv("ISO-8859-1","UTF-8",$filename );
  </code></pre>
  
  <p>or</p>
  
  <pre><code>echo utf8_encode(file_get_contents($filename));
  </code></pre>
  
  <p>NOT help, because after getting web content speciall characters as š ť ž are replaced with question marks ???</p>
  
  <p>I would appreciate any kind of help.</p>