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
to show correctly latin characters like ñ Ñ á é í ó ú, etc.. in browsers, you have to use iso-8859-1 instead of UTF-8 encoding
http://www.w3schools.com/tags/ref_entities.asp