title: Getting url data by curl method giving unexpected results in symbols
body: <p>I am facing some times Problem in getting url data by curl method specially website data is is in other language like arabic etc
  My curl function is </p>
  
  <pre><code>function file_get_contents_curl($url)
  {
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_HEADER, 0);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  
      $data = curl_exec($ch);
      $info = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
  
      //checking mime types
      if(strstr($info,'text/html')) {
          curl_close($ch);
          return $data;
      } else {
          return false;
      }
  }
  </code></pre>
  
  <p>And how i am getting data</p>
  
  <pre><code>$html =  file_get_contents_curl($checkurl);
      $grid ='';
      if($html)
      {
          $doc = new DOMDocument();
          @$doc-&gt;loadHTML($html);
          $nodes = $doc-&gt;getElementsByTagName('title');
          @$title = $nodes-&gt;item(0)-&gt;nodeValue;
          @$metas = $doc-&gt;getElementsByTagName('meta');
          for ($i = 0; $i &lt; $metas-&gt;length; $i++)
          {
              $meta = $metas-&gt;item($i);
              if($meta-&gt;getAttribute('name') == 'description')
                  $description = $meta-&gt;getAttribute('content');
          }
  </code></pre>
  
  <p>I am getting all data correctly from some arabic websites like 
  <a href="http://www.emaratalyoum.com/multimedia/videos/2012-04-08-1.474873" rel="noreferrer">http://www.emaratalyoum.com/multimedia/videos/2012-04-08-1.474873</a>
  and when i give this youtube url 
  <a href="http://www.youtube.com/watch?v=Eyxljw31TtU&amp;feature=g-logo&amp;context=G2c4f841FOAAAAAAAFAA" rel="noreferrer">http://www.youtube.com/watch?v=Eyxljw31TtU&amp;feature=g-logo&amp;context=G2c4f841FOAAAAAAAFAA</a><br>
  it shows symbols..
  what setting i have to do to show exactly the same title description.</p>