I just recently installed Winamp Song Requester wich is a Winamp web song requester plugin with a built in minimal HTTP CGI Server.
What the plugin does is that it r
This is just to point out that while the overrideMimeType() method is available in Gecko-based browsers (Firefox, ...), it is NOT in IE (at least <=7), and there appears to be no workaround. (I don't know about availability in other browsers.)
At first, it would be better if you've used the more general $.ajax() function.
According to the documentation there is the scriptCharset option, however it is only applicable in certain data types. It is also stated that this is necessary only if the encoding of the calling page is different.
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.