Special characters problem.
I have a problem with some special characters with my Ajax application. I use an asp-site which use a javascript to query a database by requesting an asp-file to print some html which I then display by using innerhtml. The asp-file uses vbscript and the Response.Write-syntax.
A part of the javascript looks like this:
var url="getsupps.asp";
url=url+"?s="+URLEncode(strSupplier);
url=url+"&f="+URLEncode(strFilepath);
url=url+"&u="+URLEncode(strUsername);
url=url+"&l="+intList;
url=url+"&text="+URLEncode(strText);
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function stateChanged()
{
if (xmlHttp.readyState==4)
{
document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
}
}
In Firefox, each special character is replaced by a '�', whichever character encoding I use on the first page, I guess this encoding doesn't apply to the innerhtml. In IE6 these special characters are replaced by a '?' and also replacing the coming 3 characters after the special character, i.e. 'sample text' = 'sample ?xt'.
I've searched for an answer for quite some time now but can't find an answer, thanks for your time! :)
Regards,
Peros

