The length of the string Pépé
is 6 characters in Chrome, but it is 4 characters in Safari. To determine this, I open up the consoles in both the browsers and enter the following code:
"Pépé".length
This difference is giving me trouble on the server side.
I am using jQuery.$ajax to send a POST request with data containing the string Pépé
. When that data reaches the server, it is treating the values differently. I am able to retrieve the data when I am in Chrome but not when I am in Safari.
Inside of the ajax request, I am setting the parameter, contentType: application/json; charset=utf-8
.
On the server side, it looks like Pépé
when doing the POST request from Safari and PeÃÅpeÃÅ
when doing the POST request from Chrome.
Any clue why there is a difference between browsers?