if(mb_detect_encoding($stringa,'utf8,iso-8859-1') == 'UTF-8'){
echo 'la stringa è in utf8';
}else{
echo 'la stringa non è in utf8';
}