how to check if any character in a string is not utf8 in python code example Example: python is ascii 'mystring'.isascii() # true 'mÿstring'.isascii() #false