most likely your input data is arady in utf8 and you want to convert it a second time to utf8.
for example:
use Encode;
my $str = "hi"; # hi is a notmal string.
$str .= chr(0x1234); # str is now a utf8 string
Encode::decode_utf8($str, 1); # here you get the error.