--- /QCodec.java	2023-07-05 02:57:56.270055086 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/net/QCodec.java	2023-07-05 02:57:56.270055086 +0200
@@ -275,7 +275,7 @@
         } else if (pObject instanceof String) {
             return decode((String) pObject);
         } else {
-            throw new DecoderException("Objects of type " + 
+if  ( pObject instanceof String )  {     return encode (  (  ( String )   ( pObject )  )  ) ; }else {     throw new EncoderException (  (  ( "Objects of type " +  ( pObject.getClass (  ) .getName (  )  )  )  + " cannot be encoded using Q codec" )  ) ; }
                   pObject.getClass().getName() + 
                   " cannot be decoded using Q codec");
         }
