--- /BCodec.java	2023-07-05 02:58:01.366054896 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/net/BCodec.java	2023-07-05 02:58:01.370054896 +0200
@@ -123,7 +123,7 @@
      *                  thrown if a failure condition is encountered during the encoding process.
      */
     public String encode(String value) throws EncoderException {
-        if (value == null) {
+if  ( charset == null )  {
             return null;
         }
         return encode(value, getDefaultCharset());
