# $text is the variable containing "Espaņol" from the database use Encode; $text = encode("iso-8859-1", decode("utf-8", $text)); # now print $text