Grazie mille per le risposte. Tuttavia ho provato a eseguire la pagina, forzando la codifica in iso-8859-1 e il risultato è che si vede tutto correttamente.... però ho notato anche che il problema si ripresenta nel momento in cui la pagina web che contiene lo scritto viene caricata da ajax. In quel momento, la codifica funziona solo per le lettere accentate, ma non visualizza gli apostrofi (') e le virgolette (").
La funzione ajax che uso per richiamare la pagina web è la seguente:
codice:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script language="JavaScript">
var myRequest2 = null;
function CreateXmlHttpReq(handler) {
var xmlhttp = null;
try {
xmlhttp = new XMLHttpRequest();
} catch(e) {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
xmlhttp.onreadystatechange = handler;
return xmlhttp;
}
function myHandler3() {
if (myRequest2.readyState == 4 && myRequest2.status == 200) {
document.getElementById('scritto').innerHTML=myRequest2.responseText;
}
}
function carica_scritto(){
var r=Math.random();
myRequest2 = CreateXmlHttpReq(myHandler3);
myRequest2.open("GET","prova.php?r="+escape(r));
myRequest2.setRequestHeader("Content-Type", "text/html; charset=ISO-8859-1");
myRequest2.send(null);
}
</script>
</head>
<body>
<?php
echo ("<script language='JavaScript'>javascript:carica_scritto()</script>");
echo "<div id='scritto' align='left'> </div>";
?>
</body>
</html>
Sapete dirmi come mai questa anomalia? Grazie ancora di tutto.