code: protected function encodingIsSupported(string $encoding): bool
      {
          $lowercaseSupportedEncodings = array_map('strtolower', $this->getSupportedEncodings());
          $lowercaseEncoding = strtolower($encoding);
  
          return in_array($lowercaseEncoding, $lowercaseSupportedEncodings, true);
      }
docs: Checks whether or not an encoding is supported
  
  @param string $encoding The encoding to check
  @return bool True if the encoding is supported, otherwise false