title: utf8 to ISO-8859-1 not converting some characters correctly through Curl
body: <p>I have an application that is taking UTF8 encoded characters and needs to send them as part of xml through curl with ISO-8859-1 encoding.</p>
  
  <p>This is my test code:</p>
  
  <pre><code>header('Content-Type: text/plain; charset=IS0-8859-1');
  
  $message = '§ ° " @ # € % &amp; / ( ) = + ` ´ ^ ¨ * - _ : . ; ,';
  
  echo mb_convert_encoding($message, 'ISO-8859-1', 'UTF-8');
  
  //build xml to post
  $content =
      '&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
      &lt;mobilectrl_sms&gt;
          &lt;header&gt;
              &lt;customer_id&gt;'.CUSTOMER_ID.'&lt;/customer_id&gt;
              &lt;password&gt;'.PASSWORD_ID.'&lt;/password&gt;
          &lt;/header&gt;
          &lt;payload&gt;
              &lt;sms account="'.SHORT_CODE.'"&gt;
                  &lt;message&gt;&lt;![CDATA['.mb_convert_encoding($message, 'ISO-8859-1', 'UTF-8').']]&gt;&lt;/message&gt;
                  &lt;to_msisdn&gt;+12345678900&lt;/to_msisdn&gt;
              &lt;/sms&gt;
          &lt;/payload&gt;
      &lt;/mobilectrl_sms&gt;';
  
  $posturl = MT_URL;
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $posturl);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml", "Content-length: ".strlen($content), "charset=ISO-8859-1"));
  curl_setopt($ch, CURLOPT_HEADER, 0);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $content);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  $response = curl_exec($ch);
  </code></pre>
  
  <p>In the browser it almost works, I see § ° " @ # ? % &amp; / ( ) = + ` ´ ^ ¨ * - _ : . ; ,</p>
  
  <p>notice the Euro Sign €</p>
  
  <p>But when it comes through as a text message I am seeing 
  § ? " @ # ? % &amp; / ( ) = + ? ? ^ ? * - _ : . ; ,</p>
  
  <p>I can't figure it out, I've tried utf8_decode also but that seems to make it worse.  Am I missing something?</p>
  
  <p>Thanks</p>