code: public static function isEncodingSupported($encoding)
      {
          $encoding = strtolower($encoding);
  
          if (isset (static::supportedEncodings()[$encoding])) {
              return true;
          }
  
          return false;
      }
docs: Is this encoding supported?
  
  @param  string  $encoding
  @return bool