title: How to change encoding of a web page retrieved by Simple HTML DOM?
body: <p>I am trying to read contents of a web page </p>
  
  <pre><code>$html = file_get_html('http://www.example.com/somepage.aspx');
  </code></pre>
  
  <p>Since the page's encoding is Windows-1254, and I work on a page encoded as UTF-8, I cannot replace some words which have language-specific characters.</p>
  
  <p>For Example:</p>
  
  <p>If I try to </p>
  
  <pre><code>$str2 = str_replace('TÜRKÇE', 'TURKCE', $str);
  </code></pre>
  
  <p>it does not replace.</p>
  
  <p>I have tried <code>htmlentities()</code> function, It worked but deleted some words which contains special characters.</p>