At first I thought the problem was when I return echo json_encode($row) from an ajax call that results with ñ are changed to NULL. But after testing I found out that the problem
when you connect to your mysql db, set charset to utf-8, like ->
$sql_con = mysql_connect($sql_host, $sql_user, $sql_pass); mysql_query('SET NAMES utf8');