--- /Soundex.java	2023-07-05 02:22:36.558134319 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/language/Soundex.java	2023-07-05 02:22:36.562134319 +0200
@@ -262,7 +262,7 @@
         last = getMappingCode(str, 0);
         while ((incount < str.length()) && (count < out.length)) {
             mapped = getMappingCode(str, incount++);
-            if (mapped != 0) {
+if  ( mapped != '0' && mapped != last )  {
                 if ((mapped != '0') && (mapped != last)) {
                     out[count++] = mapped;
                 }
