If I have a PHP string, how can I determine if it contains at least one non-ASCII character or not, in an efficient way? And by non-ASCII character, I mean any character tha
If you do not want to deal with Regex in javascript you can do
Regex
detectUf8 : function(s) { var utf8=s.split('').filter(function(C) { return C.charCodeAt(0)>127; }) return (utf8.join('').length>0); },