title: php curl, xml content character problem
body: <p>Hello I just start to develop php what I want to do is to get xml contents from another site but when i get it like this</p>
  
  <pre><code>$options = array(
    CURLOPT_RETURNTRANSFER =&gt; true,     // return web page
    CURLOPT_HEADER         =&gt; false,    // don't return headers
    CURLOPT_ENCODING       =&gt; "UTF-8",       // handle compressed
   CURLOPT_USERAGENT      =&gt; "spider", // who am i
   );
   $ch      = curl_init("http://wxxx.xml");
   curl_setopt_array( $ch, $options );
   $file = curl_exec( $ch );
   curl_close( $ch );
  </code></pre>
  
  <p>it returns corrupted characters I can make it look like ok when I change header of page to UTF-8 but the problem is that I cannot insert these variables to database they are corrupted there too, How can I fix this? thank you for any answer.</p>