In my previous post I had a function to remove characters greater than ascii code 126. Josh Sled and William Newton emailed me and some ideas went back and forth. As a result, here’s a much easier function to solve the issues. It came down to multi-byte encoding not being considered.
function mb_sanity($text)
{
return mb_convert_encoding($text, 'HTML-ENTITIES', "UTF-8");
}



