Fix bug 9975 Incorrect SoundEx result (#388)
This commit is contained in:
parent
38db06f931
commit
49493290c5
@ -52,6 +52,8 @@ def soundex(strval):
|
|||||||
return "Z000"
|
return "Z000"
|
||||||
strval = strval.decode('ASCII', 'ignore')
|
strval = strval.decode('ASCII', 'ignore')
|
||||||
str2 = strval[0]
|
str2 = strval[0]
|
||||||
|
translator = strval.maketrans('','',IGNORE)
|
||||||
|
strval = strval.translate(translator)
|
||||||
strval = strval.translate(TABLE)
|
strval = strval.translate(TABLE)
|
||||||
if not strval:
|
if not strval:
|
||||||
return "Z000"
|
return "Z000"
|
||||||
|
Loading…
Reference in New Issue
Block a user