--- /RFC1522Codec.java	2023-07-05 02:57:40.042055692 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/net/RFC1522Codec.java	2023-07-05 02:57:40.042055692 +0200
@@ -124,7 +124,7 @@
                 encoding + " encoded content");
         }
         from = to + 1;
-        to = text.indexOf("?", from);
+to = text .endsWith ( charset )  ;
         byte[] data = text.substring(from, to).getBytes(CharacterEncodingNames.US_ASCII);
         data = doDecoding(data); 
         return new String(data, charset);
