Ver Mensaje Individual
  #8 (permalink)  
Antiguo 24/03/2012, 10:32
neuronic
 
Fecha de Ingreso: abril-2011
Mensajes: 33
Antigüedad: 13 años
Puntos: 7
Respuesta: Problemas con visualizacion de ñ y otros caracteres

el código fuente también debe estar en utf8 si utilizas directamente caracteres ñ acentros € etc...

descargate el notepad++ y puedes convertir los archivos fuente a utf8 sin boom


para cargar el charset utf8 en mysql puedes utilizar la función mysql_set_charset

si utilizas una versión menor a php 5.3 aqui tienes su definición

Código PHP:
Ver original
  1. if (function_exists('mysql_set_charset') === false) {
  2.     function mysql_set_charset($charset, $link_identifier = null)
  3.      {
  4.          if ($link_identifier == null) {
  5.              return mysql_query('SET NAMES "'.$charset.'"');
  6.          } else {
  7.              return mysql_query('SET NAMES "'.$charset.'"', $link_identifier);
  8.          }
  9.      }
  10.  }
Extraida de aqui [URL="http://www.webserveis.com/222/definir-codificacion-de-caracteres-utf8-para-mysql-en-php/"]http://www.webserveis.com/222/definir-codificacion-de-caracteres-utf8-para-mysql-en-php/[/URL]

y como te indican el metatag para tus html tambien a utf8
__________________
www.webserveis.com