Fix bug 9975 Incorrect SoundEx result (#388)

This commit is contained in:
Sam Manzi 2017-05-05 16:29:27 +10:00
parent 95e0f43bf5
commit db3655d156

View File

@ -52,6 +52,8 @@ def soundex(strval):
return "Z000"
strval = strval.decode('ASCII', 'ignore')
str2 = strval[0]
translator = strval.maketrans('','',IGNORE)
strval = strval.translate(translator)
strval = strval.translate(TABLE)
if not strval:
return "Z000"