$ not_utf8="$( printf "\x96" )" $ perl -e"use utf8; q{$not_utf8}" Malformed UTF-8 character: \x96 (unexpected continuation byte 0x96, with no preceding start byte) at -e line 1. Malformed UTF-8 character (fatal) at -e line 1.