Problem with RSS Feed

Found a bug? Tell us!!
Post Reply
Tscherno
Regular
Posts: 17
Joined: Wed Oct 19, 2005 1:13 pm
Contact:

Problem with RSS Feed

Post by Tscherno »

I have a problem with using the RSS-Feed. I wrote an small rss-parser for my website which i am using for heise news and so on. I tried it with the exported feed from my s9y installation. But all Umlauts are looking weird (look under Aktuelle Blog-Einträge):
http://masterbootrecord.de/
The feed is from http://masterbootrecord.de/blog/feeds/index.rss

Is it maybe the problem, that my Installation is NOT UTF-8 (wrong option during installation - impossible to change?)?

The Feed says that it's encoded in UTF-8 but how can i check this?

I tried to utf8_decode the Feed before parsing it but this makes no difference...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Problem with RSS Feed

Post by garvinhicking »

Yes, all RSS feeds are UTF-8 encoded. If you write your own small RSS Parser you need to take care of XML input charsets and transcode them to your output charset.

In your case, you'd need utf8_decode() on each string, but it also depends on how you wrote your parser. Look at the serendipity_plugin_remoterss plugin, that one is a fully working RSS parser with UTF-8 support.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Tscherno
Regular
Posts: 17
Joined: Wed Oct 19, 2005 1:13 pm
Contact:

Post by Tscherno »

Thank you - i just saw that i was decoding the wrong text :oops:
Tscherno
Regular
Posts: 17
Joined: Wed Oct 19, 2005 1:13 pm
Contact:

Post by Tscherno »

Now i have another problem, this time with Trackbacks. Take a look at:
http://masterbootrecord.de/blog/Auf-der ... 1_169.html

The Umlauts in the Trackback are scrambled...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Yes, that can happen depending on the charset the blog is using that is sending the trackback to you.

Trackbacks are not specified which charset to use, and transcoding them is a bit problematic. So currently s9y just shows what you get.

If you use a UTF-8 character set, you should be fine with most blogs. But some send ISO-8859-1 characters which would then make trouble.

So either way, you can't cover all characters properly - this is a bit a problem of the trackback API, which had not been specified absoultely clear in this regard.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply