So I am removing control characters (tab, cr, lf, \\v and all other invisible chars) in the client side (after input) but since the client cannot be trusted, I have to remov
it seems that I just need to add the u flag to the regex thus it becomes:
$s = preg_replace('/[\x00-\x1F\x7F-\x9F]/u', '', $s);