...

View Full Version : Weird Symbols on Parse



hackmeanscode
03-18-2007, 06:56 PM
Hi,
I am using SimplePie to parse RSS feeds and for some reason I keep getting symbols like —. I need this to stop! I am using PHP to strip all HTML tags except for
<a> and
<p>. How can I get these symbols to parse as regular Roman characters or to not appear at all? Please help!

Thanks,
Matthew

hackmeanscode
03-18-2007, 10:49 PM
Anyone?

aedrin
03-19-2007, 03:08 PM
I am using SimplePie to parse RSS feeds and for some reason I keep getting symbols like

I have no experience with using SimplePie, but I do know that those symbols usually appear with string encoding problems. Check your string encoding settings to see that they match up with what you are feeding it.

RTrev
03-19-2007, 05:35 PM
Hi,
I am using SimplePie to parse RSS feeds and for some reason I keep getting symbols like —. I need this to stop! I am using PHP to strip all HTML tags except for
<a> and
<p>. How can I get these symbols to parse as regular Roman characters or to not appear at all? Please help!

Thanks,
Matthew

Are you by any chance getting these RSS feeds from Google? A friend was getting the same thing, and it turned out to be a problem on Google's end. Last I knew, as of a few weeks ago, he was still waiting for them to fix it. I think it might be fixed now.. but am not certain.

HTH,
Bob

hackmeanscode
03-19-2007, 09:14 PM
It's occurring quite randomly. It's even happening on Daily Kos feeds, LA Times feeds, etc... By the way, I'm using the feed parsing for something I'm making called Tudit. You can see an example of the weird characters I'm talking about at: http://tudit.com/hihi/channel.php?q=politics

aedrin
03-19-2007, 09:31 PM
Example: "WASHINGTON — One day last week, the entire Federal"

The 'weird symbol' here represents the long dash. As I said before, this is an encoding issue. For example, UTF-8 vs. ISO-8859-1. It's reading it as the wrong character encoding (single byte vs. double byte), hence it comes out with extra weird characters.

hackmeanscode
03-20-2007, 01:44 AM
I've checked into SimplePie and it looks like it's made to handle both types of encoding! Help!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum