Add new comment

Phil Sun, 08/17/2008 - 15:50

In reply to by Adrovsky

Comment

Pues manera fácil para lo de los símbolos no hay, al menos por lo que yo he podido averiguar. Hay funciones de php que parece que hacen cosas similares (empiezan por 'mb_' como 'mb_convert_encoding') pero aún no he conseguido hacerme con cuándo y como se aplican. Al final lo he hecho con (no sé si boastmachine lo mostrará bien):

$value = str_replace("'","'",$value);
$value = str_replace("â?¬","?",$value);
$value = str_replace("é","é",$value);
$value = str_replace("á","á",$value);
$value = str_replace("","Á",$value);
$value = str_replace("´","´",$value);
$value = str_replace("²","²",$value);
$value = str_replace("º","º",$value);
$value = str_replace("©","©",$value);
$value = str_replace("ª","ª",$value);
$value = str_replace("°","°",$value);
$value = str_replace("ú","ú",$value);
$value = str_replace("ó","ó",$value);
$value = str_replace("ñ","ñ",$value);
$value = str_replace("¡","¡",$value);
$value = str_replace("ä","ä",$value);
$value = str_replace("í¼","ü",$value);
$value = str_replace("¿","¿",$value);
$value = str_replace("Ã","í",$value);

No sé si esto soluciona todos los caracteres existentes, pero sí todos los que he podido ver en pocos vistazos. La alternativa (aparte de algo nativo de php) sería hacerlo uno por uno via comandos de mysql (search&replace).

Un abrazo

The content of this field is kept private and will not be shown publicly.

Filtered HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
CAPTCHA
Enter the characters shown in the image.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.