Summery Summery

Set the output encoding

Syntax Syntax

SimplePie::set_output_encoding( string $encoding = 'UTF-8' )

Description Description

Allows you to override SimplePie’s output to match that of your webpage. This is useful for times when your webpages are not being served as UTF-8. This setting will be obeyed by handle_content_type(), and is similar to set_input_encoding().

It should be noted, however, that not all character encodings can support all characters. If your page is being served as ISO-8859-1 and you try to display a Japanese feed, you’ll likely see garbled characters. Because of this, it is highly recommended to ensure that your webpages are served as UTF-8.

The number of supported character encodings depends on whether your web host supports mbstring, iconv, or both. See for more information.

Parameters Parameters


(string) (Optional)

Default value: 'UTF-8'

Source Source

File: wp-includes/class-simplepie.php




Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.