SimplePie::set_input_encoding()publicWP 1.0

Set the character encoding used to parse the feed

This overrides the encoding reported by the feed, however it will fall back to the normal encoding detection if the override fails

Method of the class: SimplePie{}

No Hooks.

Return

null. Nothing (null).

Usage

$SimplePie = new SimplePie();
$SimplePie->set_input_encoding( $encoding );
$encoding(string)
Character encoding
Default: false

SimplePie::set_input_encoding() code WP 6.5.4

public function set_input_encoding($encoding = false)
{
	if ($encoding)
	{
		$this->input_encoding = (string) $encoding;
	}
	else
	{
		$this->input_encoding = false;
	}
}