use HTML::Entities; use Encode; my $title_checking=$cgi->param("title_checking"); $title_checking=decode_entities($title_checking); $title_checking=encode('UTF-8',$title_checking); $title_checking=$prl->trim($title_checking); print "$title_checking";