I have a problem with encoding with AJAX.
I am not using a framework, just standard javascript. Through AJAX I load a HTML file and display the responseText inside a div (innerHTML = req.responseText).
The problem is that it does not load a client-server request, but a regular HTML file, so the encoding goes crazy and things like á , é, í, etcetera are not displayed correctly. I would like to know if there is some way to indicate the XHMTLRequest object to load the response in a given encoding, or to give the HTML file that is loaded an specific header for the Ajax request to understand it correclty.