title: Encoding problem when using htmlentities method
body: <p>I've a problem of character encoding in php, so this's the php code:</p>
  
  <pre><code>n_event=$_GET['ndlann'];
  $nom_complet=htmlentities(stripslashes($_POST['nom']));
  $email_comment=htmlentities(stripslashes($_POST['email']));
  $titre_comment=htmlentities(stripslashes($_POST['titre']));
  $texte_comment=htmlentities(stripslashes(nl2br($_POST['commentaire'])));
  $pays_comment=$_POST['pays'];
  $date_ajout=date('Y/m/d');
  </code></pre>
  
  <p>Data will be added in a database table , you see that this data comes from a comments form,
  so when the user enters some comments with orient languages carachters (arabic,hebrew...etc), the input data will change to something like : </p>
  
  <blockquote>
    <p>Ø´Ù�Ø±Ø§ Ø¹Ù�Ù� Ø§Ù�Ù�Ù�Ø¶Ù�Ø</p>
  </blockquote>
  
  <p>I tried to delete the htmlentities method and that works fine , but does start another problem of comments form security (js scripts will be executed)</p>
  
  <p>What can I do with this situation? </p>
  
  <p>and thanks</p>