caratteri accentati

giacomolibero

Nuovo Utente
5 Gen 2010
11
0
0
problema visualizzazione caratteri accentati in una pagina asp che recupera dati da un db access. In particolare la e accentata (è) viene mostrata sul web con un carattere così Ã

questa il codice della pagina:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.testo2 {
font-family: Verdana, Geneva, sans-serif;
font-size: 12px;
font-weight: normal;
font-style: normal;
background-color: #FFC;
}
-->
</style>
</head>

<body bgcolor="#000000">
<table width="420" height="81" border="0" class="testo2">
<tr align="center" class="testo2">
<td width="120" height="20"><strong>Nome</strong></td>
<td><strong>Commento</strong></td>
<td width="125"><strong>data &amp; ora</strong></td>
</tr>
<% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) %>
<tr align="center" class="testo2">
<td width="120" height="47"><%=(Recordset1.Fields.Item("Name").Value)%></td>
<td height="47"><%=(Recordset1.Fields.Item("Commento").Value)%></td>
<td width="125" height="47"><%=(Recordset1.Fields.Item("date").Value)%></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>

Soluzioni?
 
Devi sostituire tutte le lettere accentate nelle loro rispettive entità HTML prima di inserirle nel database. In PHP si può fare con htmlentities, in ASP non ne ho idea, però basta che sostituisci è con &egrave; e così via.
 
trovato l'inghippo!!

trovato l'inghippo!! il problema è il codepage 65001.
Per i caratteri UTF-8 bisogna impostare codepage=1252.
La pagina è fatta con Dreamweaver che imposta automaticamente il codepage a 65001..
Grazie lo stesso e spero sia utile ad altri
 

Discussioni simili