Returns 1 if the given string is UTF-8, otherwise returns 0. It is undocumented... But yet it's there for you to use.
Thank you for your help but I am not trying to make any script, I am just trying to find a way to know what was said to me by guessing the senders encoding, I don't know if this is possible or not or how ....