jQuery $.get() charset of reply when no header is set?
edit: ok i think this works (at least it worked in my test environment, see revisions for previous attempt)
$.ajaxSetup({
'beforeSend' : function(xhr) {
xhr.overrideMimeType('text/html; charset=UTF-8');
},
});
$('#stuff').load('/yourresource.file'); // your ajax load
what i had was the main file set in UTF-8
and the data file set in ISO-8859-1
. without the above code, i got a bunch of garbage for the test string åäöé, as expected. with the above code, it loaded åäöé properly encoded.