Kevin Nelson's Answer Re: $string = preg_replace('/[^[:print:]]/', '', $string);
Is a PHENOMENAL and easier solution. I had encountered a UTF-8 No Break space after almost 10 years of never having seen that character.
Instead of working hard to black list new characters a simple white listing from Kevin Nelson was a life saver ! (This is confirmed to work on PHP 8.1)