Author |
Message |
ArmouredWurzel
Joined: 30 Jul 2013
Posts: 9
Location: UK
|
Posted:
Sat Apr 15, 2017 8:07 am |
  |
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. |
|
|
 |
 |
Tech Support
Joined: 27 Aug 2004
Posts: 2806
|
Posted:
Mon Apr 17, 2017 7:42 am |
  |
|
 |
 |
ArmouredWurzel
Joined: 30 Jul 2013
Posts: 9
Location: UK
|
Posted:
Mon Apr 17, 2017 1:41 pm |
  |
|
 |
 |
Tech Support
Joined: 27 Aug 2004
Posts: 2806
|
Posted:
Mon Apr 17, 2017 2:05 pm |
  |
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 |
|
 |
 |
ArmouredWurzel
Joined: 30 Jul 2013
Posts: 9
Location: UK
|
Posted:
Tue Apr 18, 2017 12:30 pm |
  |
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. |
|
|
 |
 |
ArmouredWurzel
Joined: 30 Jul 2013
Posts: 9
Location: UK
|
Posted:
Tue Apr 18, 2017 12:35 pm |
  |
Ah I see it, in the sample template header?
Regards,
Dave. |
|
|
 |
 |
ArmouredWurzel
Joined: 30 Jul 2013
Posts: 9
Location: UK
|
Posted:
Tue Apr 18, 2017 12:50 pm |
  |
[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. |
|
|
 |
 |
Tech Support
Joined: 27 Aug 2004
Posts: 2806
|
Posted:
Tue Apr 18, 2017 2:42 pm |
  |
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 |
|
 |
 |
ArmouredWurzel
Joined: 30 Jul 2013
Posts: 9
Location: UK
|
Posted:
Tue Apr 18, 2017 2:46 pm |
  |
I assume that you can only have one? Am I right that it goes in the template header?
Regards, Dave. |
|
|
 |
 |
Tech Support
Joined: 27 Aug 2004
Posts: 2806
|
Posted:
Tue Apr 18, 2017 2:57 pm |
  |
|
 |
 |
ArmouredWurzel
Joined: 30 Jul 2013
Posts: 9
Location: UK
|
Posted:
Tue Apr 18, 2017 4:42 pm |
  |
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. |
|
|
 |
 |
Tech Support
Joined: 27 Aug 2004
Posts: 2806
|
Posted:
Wed Apr 19, 2017 8:00 am |
  |
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 |
|
 |
 |
|