Jquery Ignores Encoding Iso-8859-1
I have a website which apperently removes the correct encoding (ISO-8859-1) from a string and sends it wrong. I have this encoding specified in my HTML
$.ajax({
url: '...',
contentType: 'Content-type: text/plain; charset=iso-8859-1',
// This is the imporant part!!!beforeSend: function(jqXHR) {
jqXHR.overrideMimeType('text/html;charset=iso-8859-1');
}
});
Solution 2:
According to the jQuery.ajax()
contentType
documentation:
Data will always be transmitted to the server using UTF-8 charset; you must decode this appropriately on the server side."
Post a Comment for "Jquery Ignores Encoding Iso-8859-1"