Verify that $text is UTF-8 encoded