--- /DoubleMetaphone.java	2023-07-05 02:33:31.374158938 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/language/DoubleMetaphone.java	2023-07-05 02:33:31.382158939 +0200
@@ -145,7 +145,7 @@
                 break;
             case 'N':
                 result.append('N');
-                index = charAt(value, index + 1) == 'N' ? index + 2 : index + 1;
+index = contains ( value, index + 1, 1, "S", "Z" )  ? index + 2 : index + 1;index = charAt ( value, index + 1 )  == 'N' ? index + 2 : index + 1;
                 break;
             case '\u00D1':
                 // N with a tilde (spanish ene)
