title: PHP - Email with arabic characters
body: <p>I'm building a small app to send my "2do" list stuff to Evernote over email. For the body of the message the characters are shown correctly but for the subject the characters are messed up. This is the PHP code:</p>
  
  <p>The main PHP:</p>
  
  <pre><code>$subject      = $_POST["thesubject"];
  
      $bound_text=md5(uniqid(time()));
      $headers.="MIME-Version: 1.0\r\n" . "Content-Type: multipart/mixed; boundary=\"PHP-mixed-$bound_text\"\r\n";
  
      $message="--PHP-mixed-$bound_text\r\n"      
                  ."Content-Type: text/html; charset=\"utf-8\"\r\n"
                  ."Content-Transfer-Encoding: 7bit\r\n\r\n"  
                  ."&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;"
                  ."&lt;div style=\"font-family: Arial, Helvetica, sans-serif; font-size : 1.3em; color: #000000;width: 100%;text-align: left;\"&gt;$text_message&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;\r\n\r\n"  
                  ."--PHP-mixed-$bound_text\r\n"  
                  ."Content-Transfer-Encoding: base64\r\n"
                  ."Content-Disposition: attachment; filename=\"$attachment\"\r\n"
      ."Content-Type: image/jpeg; name=\"$attachment\"\r\n\r\n"
       .chunk_split($file)
              ."\r\n\r\n"
                  ."--PHP-mixed-$bound_text--\r\n\r\n";
  
      }
  
  The mail part:
  
      $subject_evernote = utf8_decode($subject); 
      mail($evernote,$subject_evernote,$message,$headers);
  </code></pre>
  
  <p>What is wrong with it?</p>