Nov-23-2018, 09:17 PM
(This post was last modified: Nov-23-2018, 09:19 PM by Gribouillis.)
I think you could use the re module for a better performance
regex = re.compile(ur"[^\x00-\xff]+") clean_string = regex.sub(u"", string.decode('utf8')).encode('utf8')Why use python 2?