use Encode qw(from_to); ... while($r = $sth->fetchrow_hashref()) { from_to($r->{$_},"utf8","latin1") for keys %$r; }