use Encode; # ... do whatever it takes to query for inserted text, # and assign the "Spanish" string from the DB to $fldvalue ... # the string value from the DB is not flagged as utf8 in Perl, # so set the utf8 flag: my $fldvalue = decode( 'utf8', $fldvalue );