Try it again

This commit is contained in:
Kepoor Hampond 2017-06-10 18:40:11 -07:00
parent c2b0573040
commit 5d2537b236

View file

@ -98,7 +98,7 @@ class ObjManip: # Object Manipulation
def blank(string, downcase=True): def blank(string, downcase=True):
import re import re
regex = re.compile('[^a-zA-Z0-9\ ]') regex = re.compile('[^a-zA-Z0-9\ ]')
string = regex.sub('', string.encode('ascii', 'ignore')) string = regex.sub('', string.decode("utf8"))
if downcase: if downcase:
string = string.lower() string = string.lower()
return ' '.join(string.decode().split()) return ' '.join(string.decode().split())