check if string `foo` is utf-8 encoded,foo.decode('utf8').encode('utf8')