use Encode qw(is_utf8 encode decode); binmode STDOUT,':encoding(iso8859-1)'; my $utf8 = "This's a \x{201c}test\x{201d}"; print "Is this utf8: ",is_utf8($utf8) ? "Yes" : "No", "\n"; print encode("iso-8859-1", decode("utf8",$utf8)), "\n"; # Here perl say that "Cannot decode string with wide characters"