|  | Posted by Flash on 11/27/05 00:07 
I am learning php and I am trying to adapt the following to read several rssversion="0.91" feeds with encoding="iso-8859-1".
 
 I mostly have the desired output that I want, BUT I do not know how to
 correct a problem in the output: I am unable to decode "A" grave characters
 appearing in item descriptions. Below is the relevant code used to parse
 the rss feed. I have substituted several functions where
 htmlspecialchars_decode_php4 is located without any change.
 
 function htmlspecialchars_decode_php4 ($str) {
 return strtr($str,
 array_flip(get_html_translation_table(HTML_SPECIALCHARS)));
 }
 
 function charElement( $parser, $text ) {
 if( $GLOBALS['title'] == true ) {
 $GLOBALS['titletext'] .= htmlspecialchars_decode_php4
 ( trim($text) );
 }
 else if( $GLOBALS['link'] == true ) {
 $GLOBALS['linktext'] .= trim( $text );
 }
 else if( $GLOBALS['description'] == true ) {
 $GLOBALS['desctext'] .= htmlspecialchars_decode_php4
 ( trim( $text ) );
 }
 }
 
 Thanks for any help,
  Navigation: [Reply to this message] |