FeedForAll Forum Index  
 Home  •  FAQ  •   Search   •  Register   •  Profile   •  Log in
 Special characters in feed titles make them unreadable! View next topic
View previous topic
Post new topicReply to topic
Author Message
ArmouredWurzel



Joined: 30 Jul 2013
Posts: 9
Location: UK

PostPosted: Sat Apr 15, 2017 8:07 am Reply with quoteBack to top

I am getting feed titles such as "“I’m absolutely gobsmacked”: Former landmark ......." which clearly means the feed title is unreadable. Sometime back I recall updating a template to overcome this issue but now some feed titles have the issue re-appearing. Grateful if anyone could advise me how to correct this issue.

Regards, Dave.
View user's profile
Tech Support



Joined: 27 Aug 2004
Posts: 2783

PostPosted: Mon Apr 17, 2017 7:42 am Reply with quoteBack to top

What's the link to your feed? This usually happens when your website doesn't use UTF-8 encoding but I'd like to have a look to be sure.

_________________
Create RSS Feeds
Audio Recording and Editing
View user's profile
ArmouredWurzel



Joined: 30 Jul 2013
Posts: 9
Location: UK

PostPosted: Mon Apr 17, 2017 1:41 pm Reply with quoteBack to top

Hi,

2 of the RSS links are as below:

http://www.bournemouthecho.co.uk/news/rss/

http://www.pcadvisor.co.uk/latest/rss

Regards,

Dave.
View user's profile
Tech Support



Joined: 27 Aug 2004
Posts: 2783

PostPosted: Mon Apr 17, 2017 2:05 pm Reply with quoteBack to top

Dave,

That's a bit odd, both of your feeds are missing the encoding declaration.

You'll want to add encoding="UTF-8" to your RSS header.

For example, with this feed:
http://www.pcadvisor.co.uk/latest/rss

you would want to update this:
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">

to this:
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" encoding="UTF-8" version="2.0">

_________________
Create RSS Feeds
Audio Recording and Editing
View user's profile
ArmouredWurzel



Joined: 30 Jul 2013
Posts: 9
Location: UK

PostPosted: Tue Apr 18, 2017 12:30 pm Reply with quoteBack to top

Sorry but are you saying in the header of the page that is calling the feeds?

My code looks like this:

[color=blue]<p>

<?php

$XMLFILE = "http://www.bournemouthecho.co.uk/news/rss/";
$TEMPLATE = "sample-template-short-2012.html";
$MAXITEMS = "5";
include("rss2html.php");

?>

</p>
[/color]
Grateful if you could be a little more specific in where the code needs to go.

Thanks,

Dave.
View user's profile
ArmouredWurzel



Joined: 30 Jul 2013
Posts: 9
Location: UK

PostPosted: Tue Apr 18, 2017 12:35 pm Reply with quoteBack to top

Ah I see it, in the sample template header?

Regards,

Dave.
View user's profile
ArmouredWurzel



Joined: 30 Jul 2013
Posts: 9
Location: UK

PostPosted: Tue Apr 18, 2017 12:50 pm Reply with quoteBack to top

[quote="ArmouredWurzel"]Ah I see it, in the sample template header?[/quote]

I must be looking in the wrong place as id did not fix the problem!

Grateful for your guidance.

Dave.
View user's profile
Tech Support



Joined: 27 Aug 2004
Posts: 2783

PostPosted: Tue Apr 18, 2017 2:42 pm Reply with quoteBack to top

Without knowing the encoding of the source feeds (they don't seem to include one) you kind of have to guess which one to use in your template.

If utf-8 isn't helping, then the next most popular is this:

encoding="iso-8859-1"

_________________
Create RSS Feeds
Audio Recording and Editing
View user's profile
ArmouredWurzel



Joined: 30 Jul 2013
Posts: 9
Location: UK

PostPosted: Tue Apr 18, 2017 2:46 pm Reply with quoteBack to top

I assume that you can only have one? Am I right that it goes in the template header?
Regards, Dave.
View user's profile
Tech Support



Joined: 27 Aug 2004
Posts: 2783

PostPosted: Tue Apr 18, 2017 2:57 pm Reply with quoteBack to top

Correct, you can only have one and it will need to go in the template header.

_________________
Create RSS Feeds
Audio Recording and Editing
View user's profile
ArmouredWurzel



Joined: 30 Jul 2013
Posts: 9
Location: UK

PostPosted: Tue Apr 18, 2017 4:42 pm Reply with quoteBack to top

Still not worked, looking at the BBC weather feed I see it gives the encoding in the feed as UTF-8, does that mean you need no encoding statement in the template?
Secondly, although it has UTF-8 as the encoding, the letter "A" characters have the character ^ above it, otherwise they appear correct.
View user's profile
Tech Support



Joined: 27 Aug 2004
Posts: 2783

PostPosted: Wed Apr 19, 2017 8:00 am Reply with quoteBack to top

If you are using RSS2HTML to insert a feed into an existing webpage, then the encoding declared at the top of the HTML source for the whole webpage comes into play too, as it will be what the browser uses.

Since a webpage can only support one encoding you can run into situations where some text just can't be displayed correctly.

For example, if the encoding that your webpage needs is different than the encoding used in the RSS feed you are inserting. Or, if you are inserting multiple RSS feeds into a single webpage, and they each have different encodings.

_________________
Create RSS Feeds
Audio Recording and Editing
View user's profile
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic


Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme