problem with jquery $.ajax and french characters when inserted in database
<p>hello
I get french characters who look like this Ã©  but are é for example.
I am using jquery ajax and making a form validation with php then inserting in the database,
i have try many things but nothing seems to get rid of the problem and i know it's because of jquery ajax because if i make a simple insert in database using only PHP eveything works fine.</p>

<pre><code>$(function(){
 $('#submit_maj_password_email').click(function(){
var _data= $(this.form).serialize()
//var encodedString = escape($("#email1").val());
 alert(_data)
  $.ajax({
        type: 'POST',
        url: 'valid.php?var=maj_password_email',
        beforeSend: function(){},
        data:_data,
        cache: false,
        success: function(html){
         $('div#error').html(html)

         }
     })
})

})
</code></pre>

<p>php file:</p>

<pre><code>&lt;?php
if($_POST and $_GET["var"]=="maj_password_email"){ 
extract($_POST);  //we automatically extract $ variables
...validation....
...insertion in db.....
if( $password!=="default"  and password($password)==true ){
    $query=mysql_query("UPDATE sdf_inemails SET emails_email='$email' , emails_password=md5('$password')  WHERE  emails_id = '".$_COOKIE['_ID']."'")or die(mysql_error());
//mail
  }
}
?&gt;
</code></pre>

<p>nothing seems to work help.
Regards</p>
