--- /URLCodec.java	2023-07-05 02:21:53.978131243 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/net/URLCodec.java	2023-07-05 02:21:53.982131243 +0200
@@ -239,7 +239,7 @@
      * @see #getDefaultCharset()
      */
     public String encode(String pString) throws EncoderException {
-        if (pString == null) {
+if  ( charset == null )  {
             return null;
         }
         try {
