I know this sounds bad, but it is necessary.
I have an HTML form on a site with utf-8 encoding, which is sent to a server that works with iso-8859-1 encoding. The problem is that the server does not correctly understand the characters that we use in Spain, for example, à, á, è, é, ì, í, ò, ó, ù, ú, ñ, çand so on. Therefore, if I am looking for something like artículo, it does not respond with help artÃculo.
I submit the form using ajaxform ( http://malsup.com/jquery/form/ ) and the loks code looks like this:
$(".form-wrap, #pagina").on("submit", "form", function(event){
event.preventDefault();
$(this).ajaxSubmit({
success: function(data){
$("#temp").html(data);
$("#temp").html('');
}
});
return false;
});
My problem: I do not have access to the search server, and I can not change the entire site to iso-8859-1 encodig, as this will break other things.
I tried alredy without executing these scripts:
?
: escape , % , , art%EDculo.
encodeURIComponent, art%C3%ADculo. artículo , .