I've been messing around with a personal site for awhile now that basically parses around 500 rss feeds. I use magpierss, however, whenever an unknown character comes up in a feed, magpie returns the character as a question mark. It usually happens with quotes and apostrophes. I've tried changing the charset that magpie outputs the feeds in, and also tried changing the charset on my page, but so far nothing. I'm going through the magpie code now to see if i can add a str_replace to replace any potentially unknown characters with recognizable ones and was just wondering if anyone has come across this problem before? And if so, has anyone come up with a solution for it? Example, this shows up on my site: Judge Excludes Defendant?s Statements in Sex Abuse Case As opposed to the original headline: Judge Excludes Defendant’s Statements in Sex Abuse Case Thanks
I have used MagpieRss for a long time and charset encoding was one of the worst problems. Did you try other parser, for example www.simplepie.org ?
I've used magpie for a long time and i had those issues. I am the kind of programmer that doesn't worry about those little things until they become critical. Cant tell you how did i went around those problems but i fixed them, i remember. The thing with the feeds is not so much about the parser, you basically need to look into the feed source and check which encode does it comes with, some feeds come with html, some don't, some come with simple text but use html entities, it's basically a big mess. Going for another parser wont solve your problems, sorry to tell you this but you will have to analyze case by case.
I've been using Magpie RSS and the reason I'm posting in this thread is that just today when my website tries to call the rss_fetch.inc file the whole page freezes up and nothing prints after this line of code. Anyone else ever had this problem?
I never had such problems. I suspect one of your feeds might not be online anymore. wraping the feed parsing in a try... catch block is a good programming practice and avoid the cript execution to crash completly.
I use MagpieRSS for FeedFury.com which handles reading of about 10 feeds per second. I believe I had to change one or two default encodings to UTF8 and modify the script to output errors the way I wanted, but apart from that it works great!
Hi I'm having the same problems with faulthy encoding now. Any IDEA on why this is a problem? All the encodings in the MagpieRSS-module folder has been changed to ISO-8859-1 which is the default encoding for Norway. Getting outputs like this; * - Det handlar om innstilling * Full fyr i stova * Innbrotsraid pÃ¥ Radøy * Første brev til Humørbygda * Torbjørn Dalland These should contain the norwegian charchaters æ, ø and å. Maybe something in the CSS-files for the site template?
I am trying to use Magpie, but I get this error "Warning: MagpieRSS: Failed to parse RSS file. (> required at line 13, column 142) in /home/content/rss_fetch.inc on line 238 Site: Warning: Invalid argument supplied for foreach() in /home/content/index.php on line 16"
on my rss_fetch.inc, line 238 is actually a comment. Maybe it's better to post line 238 in here. It might be worth opening a new topic for this too.
Hi, Magpie default output is ISO-8859-1... as most of the feeds are utf-8, I've changed line 359 of rss_fetch.inc putting: define('MAGPIE_OUTPUT_ENCODING', 'utf-8'); instead of define('MAGPIE_OUTPUT_ENCODING', 'ISO-8859-1'); This works for me... clearly remember to set page charset as utf-8 (on html page that shows your content): <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ciao
Sorry i do not know your answer to the problem but there is always problem with the maggie. What can you use otherwise?
simplepie seems most active. php parsers : webresourcesdepot list carp by gecko tribe, he teamed up with a professional programmer so it might be worth checking out (unless you don't like geckos) I always use a custom script (tag parser).
Interesting. I was having the same issues and i racked my brain to figure out how to fix it. I almost scraped it altogether!