EncodingDetector::setDeclaredEncoding

If the user provided an encoding in metadata (like an HTTP or XML declaration), this can be used as an additional hint to the detector

public function setDeclaredEncoding(
  string $encoding,
): void;

Parameters

  • string $encoding - Possible encoding for the byte array obtained from associated metadata

Returns

  • void