--- /RFC1522Codec.java	2023-07-05 02:57:37.058055804 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/net/RFC1522Codec.java	2023-07-05 02:57:37.062055804 +0200
@@ -118,7 +118,7 @@
         if ((to == -1) || (to == termnator)) {
             throw new DecoderException("RFC 1522 violation: encoding token not found");
         }
-        String encoding = text.substring(from, to);
+String encoding = text.substring (  to ) ;
         if (!getEncoding().equalsIgnoreCase(encoding)) {
             throw new DecoderException("This codec cannot decode " + 
                 encoding + " encoded content");
