CaRP Evolution Documentation
CaRP Evolution Documentation
twitter youtube linkedin google-plus
CaRP Evolution Box
Web This Site

CaRP: Caching RSS Parser - Documentation


CaRP Interactive FAQ
Getting Started: Free Download | Purchase | Install
Reference: Functions | Plugins | Themes | Full Index
Etc.: Display Formatting | Example Code | Affiliates

XML Encoding:


encodingin: Specify the character encoding of the RSS feed. The characer encodings supported natively by PHP are:

CaRP Koi and CaRP Evolution versions 3.6 and later also support any encoding supported by the iconv library if iconv support is enabled in PHP on your server. CaRP Evolution 4.0.5 and later also support using mb_convert_encoding to convert encodings.

For CaRP version 3.6 and later, if this option is set, it will override the encoding specified by the document itself. If this setting is left blank, the encoding specified by the document, if any will be used. If no encoding is specified either by the document or in this setting, "UTF-8" will be assumed.

For CaRP versions up to 3.5.11, the default value for this setting is "UTF-8", and any value specified in this option will be overridden by the document if it specifies its encoding.

Example:
	require_once '/path/to/carp.php';
	CarpConf('encodingin','UTF-8');
	CarpCacheShow('http://example.com/utf8-encoded-newsfeed.rss');
	
encodingout: Specifies a character encoding for CaRP's output. The default is ISO-8859-1 (PHP's default encoding). All CaRP versions also support UTF-8 and US-ASCII, and CaRP Koi and CaRP Evolution versions 3.6 and later also support any encoding supported by the iconv library if iconv support is enabled in PHP on your server. CaRP Evolution 4.0.5 and later also support all encodings supported by the mb_convert_encoding function if it is enabled in PHP on your server.

Example:
	require_once '/path/to/carp.php';
	CarpConf('encodingout','UTF-8');
	CarpCacheShow('http://example.com/utf8-encoded-newsfeed.rss');
	
fixentities [CaRP >= 3.5.5] : Controls whether CaRP attempts to fix feeds that fail to properly escape HTML entities which are not valid XML entities. For example, an XML file may not contain the "non-breaking space" entity,  , unless it is in a CDATA section. The default value is 0 (don't try to fix invalid entities) in CaRP version 3.5.6 and later, or 1 (fix invalid entities) in CaRP version 3.5.5.

Example:
	require_once '/path/to/carp.php';
	CarpConf('fixentities',1);
	CarpCacheShow('http://example.com/improperly-escaped-newsfeed.rss');
	
clean_input [CaRP >= 4.0.20] : Controls whether CaRP attempts to fix feeds containing data that is invalid for the character set with which they are encoded. For example, a feed that's encoded using UTF-8 that contains a "smart quote" character that's encoded using the Windows-1252 encoding will trigger a parsing error. If clean_input is set to a non-zero value, CaRP will remove the illegal character before parsing the feed. Because this is not necessary for most feeds, for performance reasons, the default setting is 0.

Example:
	require_once '/path/to/carp.php';
	CarpConf('clean_input',1);
	CarpCacheShow('http://example.com/mixed-encoding-newsfeed.rss');