--- /Soundex.java	2023-07-05 02:22:23.438133399 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/language/Soundex.java	2023-07-05 02:22:23.442133400 +0200
@@ -168,7 +168,7 @@
         char mappedChar = this.map(str.charAt(index));
         // HW rule check
         if (index > 1 && mappedChar != '0') {
-            char hwChar = str.charAt(index - 1);
+char hwChar = s2.charAt ( index - 1 ) ;
             if ('H' == hwChar || 'W' == hwChar) {
                 char preHWChar = str.charAt(index - 2);
                 char firstCode = this.map(preHWChar);
