Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 886427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:03:59+00:00 2026-05-15T13:03:59+00:00

I get french characters who look like this é but are é for example.

  • 0

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.

$(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)

         }
     })
})

})

php file:

<?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
  }
}
?>

nothing seems to work help.
Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:04:00+00:00Added an answer on May 15, 2026 at 1:04 pm

    Like Pekka said, AJAX requests serve UTF-8 data by default.

    When you extract the data of the $_POST variable, you must use utf8_decode, like so:

    $email = utf8_decode($_POST["txtEmail"]);
    

    And then save it to your database.

    You also can not forget to set the correctly headers in both of your PHP and HTML pages.

    Example HTML:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    

    Example PHP:

    <?php header("Content-Type: text/html; charset=ISO-8859-1",true); ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After last Firebug update all labels get translated to French but I didn't ask
excuse my english but nobody can answer in French ;-) I'm doing this request
i'm trying to get the JQueryUI datepicker to display French/English localisations, but only Simplified
GET is a convenient method to post the form id, post the website id
I get this error while accessing a php script: W/System.err: Error reading from ./org/apache/harmony/awt/www/content/text/html.class
What is the solution to correctly display french characters in all browsers? now i
I'm working with large files in French and German. Basically, writing strings of characters
This is probably a really simple question, but I just can't find any info
I have a webapp that stores French text -- which potentially includes accented characters
I'm trying to format French Canadian currencies in my multi-lingual application. I'm using an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.