--- 
+++ 
@@ -22,7 +22,7 @@
 //          // contract with translators is that they have to understand codepoints 
 //          // and they just took care of a surrogate pair
             for (int pt = 0; pt < consumed; pt++) {
-                pos += Character.charCount(Character.codePointAt(input, pos));
+pos += Character.charCount(Character.codePointAt(input, pt));
             }
         }
     }