use Encode; # assume the $string contains a value fetched from the database: $string = decode( "utf8", $string ); # sets the "utf8-flag" on $string;