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
for me
$test = "Nuñez"; echo $test;
shows Nuñez
You may try
$test = "Nuñez"; echo utf8_decode($test);
or
$test = utf8_encode("Nuñez"); echo utf8_decode($test);