Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/01/2010, 11:09
Avatar de _-ZeuS-_
_-ZeuS-_
 
Fecha de Ingreso: junio-2007
Ubicación: Quito, Ecuador! ;)
Mensajes: 100
Antigüedad: 16 años, 10 meses
Puntos: 7
Respuesta: Problema con caracteres

si estás guardando en mysql lo que tienes que hacer cuando guardes es:
Código PHP:
mysql_real_scape_string($texto_a_guardar); 
y lo muestras con
Código PHP:
html_entity_decode($texto_de salida); 
si no te funciona nade de eso puedes poner esto:

Código PHP:
header('Content-Type: text/html; charset=UTF-8'); 
o sino indagando en la red hace poco encontré esta función que te transforma un texto a sus caracteres html:

Código PHP:
function texto_html($str){
   if (!isset(
$_SESSION["carateres_latinos"])){
      
$todas get_html_translation_table(HTML_ENTITIESENT_NOQUOTES);
      
$etiquetas get_html_translation_table(HTML_SPECIALCHARSENT_NOQUOTES);
      
$_SESSION["carateres_latinos"] = array_diff($todas$etiquetas);
   }
$str strtr($str$GLOBALS["carateres_latinos"]);
return 
$str
por si acaso te dejo tb la lista de caracteres html más usados

ñ = ñ
á = á
é=é
í=í
&oacute=ó
&uacute=ú

Y si las quieres en mayúsculas sólo pon la primera letra luego de & en mayúscula y listo

Espero que sea de tú ayuda!