commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Schnur (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CODEC-256) ColognePhonetic.encode() calculates wrong code
Date Wed, 20 Mar 2019 12:20:00 GMT
Andreas Schnur created CODEC-256:
------------------------------------

             Summary: ColognePhonetic.encode() calculates wrong code
                 Key: CODEC-256
                 URL: https://issues.apache.org/jira/browse/CODEC-256
             Project: Commons Codec
          Issue Type: Bug
    Affects Versions: 1.12
         Environment: Java 8u181 64, Windows 7 Professional 64
            Reporter: Andreas Schnur
         Attachments: ColognePhonetic.java

Example String: "ARTMANN". Code of M is 6, Code of A is Zero (and therefore is left out),
Code of N is 6 and should be left out because 6 is previous, but Code assumes wrongly 0 as
previous (which was left out). So the result is 07266, but has to be 0726 (see Description
of algorithm in class).

Solution: In method colognePhonetic() move the last two LOC into if-block above, see attached
version of class.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message