cvs: pear /XML_RSS RSS.php
| From: | Martin Jansen | Date: | Fri, 05 Nov 2004 17:02:12 +0000 |
| Subject: | cvs: pear /XML_RSS RSS.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-25707@lists.php.net to get a copy of this message | ||
mj Fri Nov 5 12:02:12 2004 EDT
Modified files:
/pear/XML_RSS RSS.php
Log:
* Added support for passing a target encoding to XML_Parser.
Bug: #2310
http://cvs.php.net/diff.php/pear/XML_RSS/RSS.php?r1=1.22&r2=1.23&ty=u
Index: pear/XML_RSS/RSS.php
diff -u pear/XML_RSS/RSS.php:1.22 pear/XML_RSS/RSS.php:1.23
--- pear/XML_RSS/RSS.php:1.22 Wed Aug 25 13:25:56 2004
+++ pear/XML_RSS/RSS.php Fri Nov 5 12:02:10 2004
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: RSS.php,v 1.22 2004/08/25 17:25:56 mj Exp $
+// $Id: RSS.php,v 1.23 2004/11/05 17:02:10 mj Exp $
//
require_once 'XML/Parser.php';
@@ -30,7 +30,7 @@
* website of the RSS working group (http://www.purl.org/rss/).
*
* @author Martin Jansen <mj@php.net>
-* @version $Revision: 1.22 $
+* @version $Revision: 1.23 $
* @access public
*/
class XML_RSS extends XML_Parser
@@ -138,14 +138,16 @@
* @param mixed File pointer, name of the RSS file, or an RSS string.
* @param string Source charset encoding, use null (default) to use
* default encoding (ISO-8859-1)
+ * @param string Target charset encoding, use null (default) to use
+ * default encoding (ISO-8859-1)
* @return void
*/
- function XML_RSS($handle = '', $srcenc = null)
+ function XML_RSS($handle = '', $srcenc = null, $tgtenc = null)
{
if ($srcenc === null) {
$this->XML_Parser();
} else {
- $this->XML_Parser($srcenc);
+ $this->XML_Parser($srcenc, 'event', $tgtenc);
}
$this->setInput($handle);