Benjamin Waters created CODEC-308:
-------------------------------------

             Summary: Nysiis encoding incorrect for the string 'Ash'
                 Key: CODEC-308
                 URL: https://issues.apache.org/jira/browse/CODEC-308
             Project: Commons Codec
          Issue Type: Bug
    Affects Versions: 1.16, 1.15
            Reporter: Benjamin Waters


When doing the Nysiis encoding for the word 'Ash' the commons codec 
implementation of Nysiis is returning null when it should return 'A'.

 

Looking over the Nysiis algorithm we can see it says: "The first character of 
the NYSIIS code is the first character of the name."

 

After that it says to scan through the characters and based on various rules it 
will remove all the characters.

Due to the rule that the first character of the name should be the first 
character of the code though, the first character should be added back if all 
others are removed.

This was double checked with [another 
implementation|http://dropby.com/NYSIIS.html] which encoded 'Ash' to 'A'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to