I have an encoding problem (only in Firefox, I tested with IE and Chrome) when I send a request with AJAX and AJAX requests only.
I'm under PHP5 / apache.
The encoding used in my site is ISO (for historical reasons), I can not change it (customer constraint).
So when I send data via an ajax request, they are retrieved UTF-8 despite that sending is done well in ISO (I checked via the debug console).
Headers of the request and page (PHP and HTML) are ISO-8859-1, as well as encoding of the page is in ISO.
I checked the php.ini settings and those of the httpd.conf, it is makes no mention encoding in UTF-8. When that was the case I changed the lines to iso.
I also tested the additions as follows "AddDefaultCharset iso-8859-1" at the http.conf or .htaccess, but nothing there.
Note that this problem has occurred since august 26, why ? (no deployment)
If anyone had the same problem and has a solution or a track start, I thank in advance.
I already try something like that :
$.ajax({
url: 'page.php?controller=test_encodage&civ='+civ+'&nom='+nom+'&prenom='+prenom+'&qualite='+qualite+'&afficher=1',
type:'POST',
contentType: 'application/x-www-form-urlencoded; charset=iso-8859-1',
beforeSend: function(jqXHR) {
jqXHR.overrideMimeType('text/html;charset=iso-8859-1');
}
});
and it's steel doesn't work
</div>