Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/03/2005, 09:44
serbe
 
Fecha de Ingreso: marzo-2004
Ubicación: Antioquia
Mensajes: 11
Antigüedad: 20 años, 2 meses
Puntos: 0
No me funcionan los acentos

Hola para todos

Tengo un inconveniente con los acentos en la página que estoy trabajando. Estoy utilizando una película flash que llama a un archivo php que hace la conexión a la base de datos y trae un registro con el campo título el cual puede contener acentos pero me saca caracteres bien raros.

Estuve leyendo algunas recomendaciones y entre ellas estaba grabar la página php con propiedades UTF-8 Unicode pero no me ha funcionado. Otra recomendación que veo es utilizar system.useCodepage = true , en la película (supongo, pero tampoco)

Aquí está eñ código php:
--------------------------------------------------
mysql_select_db($database_cent, $cent);

$tab = $HTTP_POST_VARS['thisLetter'];
$qr = mysql_query("SELECT id,titulo,id_seccion FROM ms_general where id_seccion = 2 ORDER BY id DESC Limit 1");

// start output string with number of entries
$nrows = mysql_num_rows($qr);
$rString = "n=".$nrows;

for ($i=0; $i < $nrows; $i++) {
$row = mysql_fetch_array($qr);
$rString .= "&id".$i."=".$row['id']."&titulo".$i."=".$row['titulo'];
$rString .= "&id_seccion".$i."=".$row['id_seccion'];
}
echo $rString;
?>
----------------------------------------------


Y esta la acción en la película:
----------------------------------------------
function showContent() {
System.useCodepage = true;
var i;
content.htmlText = "";
for (i=0; i < this.n; i++) {
content.htmlText += "<b><a href='javascript:Seccion_onClick(" + this["id"+i] + ")'>" + this["titulo"+i] + "</a></b>";
}
}

// Create new load vars object c for data transfer
var c = new LoadVars();
c.onLoad = showContent;

content.htmlText = "Cargando datos... ";

c.sendAndLoad("cab_ppal.php",c,"POST");

stop();

-----------------------------------

Gracias a todos