[
https://issues.apache.org/jira/browse/CODEC-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16624688#comment-16624688
]
ASF GitHub Bot commented on CODEC-250:
--------------------------------------
GitHub user DerXHelp opened a pull request:
https://github.com/apache/commons-codec/pull/14
[CODEC-250] correcting handling of special character between equal letters
for cologne phonetic
Fix for [CODEC-250](https://issues.apache.org/jira/browse/CODEC-250) for
handling of special characters between equal letters for cologne phonetic.
"Test-test" and "testtest" should result in the same value according to
cologne phonetic.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/DerXHelp/commons-codec
CODEC-250-cologne-phonetic
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-codec/pull/14.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #14
----
commit 4f6547a3dfc808824622e0ff502d9a870a66c1fc
Author: Alex Volodko <volodko@...>
Date: 2018-09-22T14:01:56Z
[CODEC-250] correcting handling of special character between equal letters
for cologne phonetic
----
> Wrong value calculated by Cologne Phonetic if a special character is placed
> between equal letters
> -------------------------------------------------------------------------------------------------
>
> Key: CODEC-250
> URL: https://issues.apache.org/jira/browse/CODEC-250
> Project: Commons Codec
> Issue Type: Bug
> Affects Versions: 1.5, 1.11
> Reporter: Alex Volodko
> Priority: Major
>
> The algorith for cologne phonetic is (simpilied):
> # Encode letter by letter from left to right according to the conversion
> table.
> # Remove all digits occurring more than once next to each other.
> # Remove all code "0" except at the beginning.
> Characters which are not specified in conversion table (such as hyphens) are
> ignored. See https://en.wikipedia.org/wiki/Cologne_phonetics
> If the input is "test-test" the step results will be:
> # 20822082
> # 2082082
> # 28282
> The expected result for "test-test" is therefor 28282.
> The actual result for "test-test" is 282{color:#FF0000}2{color}82.
> This bug is caused by the fix from
> [https://github.com/apache/commons-codec/commit/72c8759a22c6552a2dfcdf61b29729f981752879]
> and is present since 1.5
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)