PDA

View Full Version : Pausing rss scroller utf-8 problem



Nightmaster
01-18-2011, 03:05 PM
1) Script Title: Pausing RSS scroller

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/rsspausescroller/index.htm

3) Describe problem:
Hello.

Script works just fine, but it cant show utf-8 characters. Ive searched site, and read tons of suggestions, but cant get it to work. Ive tried to set character set to utf-8 by meta tags, by changing encoding in notepad++ to utf-8, and by .htaccess, but it didnt work.
Im out of ideas now. Anyone can help me with this?

Ive tried with iso charset as well. Still nothing. What im trying to display is serbian characters (like Ü,ć,č,×,đ)

Regards.

jscheuer1
01-18-2011, 04:23 PM
You might not be able to control what the feed is sending you. But there should be a way to either set the charset or to find out what it is and use that on your page. I'm not all that up on PHP. But if I had the feed I might be able to figure it out. Which feed are you having trouble with?

Also, setting all those things might not be getting the page to be served in the desired charset. To tell that, I need a link to your page.

If you want more help:

Please post a link to a page on your site that contains the problematic code so we can check it out.

Nightmaster
01-18-2011, 08:45 PM
Sorry, i forgot to post links in my first post.
Feed link:

http://vesti.samo-opusteno.info/feed/
(There IS a utf-8 charsets, like š,ć,č...)

Demo link with script:

http://samo-opusteno.info/rss/5/
There is no utf-8 characters, for example:

Novo de─Źje igrali┼íte u Bloku 1 na Novom Beogradu
It should be:

Novo dečje igralište u Bloku 1 na Novom Beogradu

Regards.

jscheuer1
01-19-2011, 04:31 PM
As I said, "I'm not all that up on PHP." I tried to modify lastRSS.php as I determined that it was the problem, but I could not, at least not yet. I may have another crack at that now that I think I see more clearly what the problem is.

I tried the feed from your post in:

RSS Display Boxes (http://www.dynamicdrive.com/dynamicindex18/rssdisplaybox/index.htm)

And it worked OK in that. So you could use that. But it doesn't scroll.

It uses simplepie.inc instead of lastRSS.php so I made up a demo using the simplepie.inc instead. This only required modifications to the scrollerbridge.php file. These were extensive, and could use some cleaning up. Some of the configuration items may not work as expected. But the all important functionality of:


// Define your list of RSS URLs- "RSS_id"=> "URL to RSS feed"
$rsslist=array(
"test" => "http://vesti.samo-opusteno.info/feed/",
"cnn" => "http://rss.cnn.com/rss/cnn_topstories.rss",
"bbc" => "http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml",
"news.com" => "http://news.com.com/2547-1_3-0-5.xml",
"slashdot" => "http://rss.slashdot.org/Slashdot/slashdot",
"dynamicdrive" => "http://www.dynamicdrive.com/export.php?type=new",
);

remains the same. The other settings in the configuration either do nothing, or are already set correctly. I think they all work though.

Here's the demo:

3718

Let me know how it works out for you.

Nightmaster
01-19-2011, 08:18 PM
Thanks for the reply once again.

That demo works fine for me too, but i dont know if theres a way to call that script on cross-domain, couse all think is about that in my case. I tried ajax rss script but it cant display contient on cross-domain, and this script can.

Can you just tell me if script provided in demo can do cross-domain thing?

Regards.

jscheuer1
01-19-2011, 08:44 PM
I've updated the archive to take care of a few discrepancies:

5241

In theory yes. I don't have anywhere very good to try it out though. I checked using my local hard drive to access it on my local server. That worked.

Try it out. Make sure to follow the instructions as far as where to use absolute paths, as mentioned on the demo page for syndication.

The routines for that are in the scrollerbridge.php file and I did my best to update them to work with the simplepie.inc file.

But they only determine which domains are allowed. If no domains are configured here:


//Domains that are authorized to display scroller:
//Seperate multiple domains each with a comma (",")
//For example: $allowedDomains="dynamicdrive.com, javascriptkit.com"
//OR enter a blank string to allow any domain (ie: for RSS feed syndication):
$allowedDomains="";

////Beginners don't need to configure past here////////////////////

all are allowed. It remains to be seen whether or not simplepie.inc will go along. However, as far as I can tell, all it does is process the feed. If you want to give people a copy of demo.htm with a link to the rsspausescroller.js on your site, and do it according to the instructions on the demo page, that should work.

One thing I realized when I did my test is that this line in the new scrollerbridge.php file:


include "../simplepie/simplepie.inc"; //path to lastRSS.php on your server relative to scrollerbridge.php

should read:


include "../simplepie/simplepie.inc"; //path to simplepie.inc on your server relative to scrollerbridge.php

But that doesn't change how it works, and doesn't need to be updated for syndication.


The path to rsspausescroller.js on the demo.htm that you distribute as well as the path to scrollerbridge.php in the rsspausescroller.js on your server, must both be absolute, just as it says on the demo page for the original script.

Nightmaster
01-21-2011, 06:07 PM
It works :)
Thank you very much, all your script are awesome :)

omano
10-04-2013, 03:44 AM
Hi. Is it possible to repair the download link for the archive rsspausescroller_pie.zip ? I have the same problem :I would like to use the rss pause scroller, but my RSS feed is in french and the original script does not support UTF-8. Thanks in advance :)

jscheuer1
10-04-2013, 04:54 AM
Done! I'll attach it here as well:

5242

omano
10-04-2013, 04:59 AM
OMG this is so fast :) Thanks a lot sir! I will try it now :)

5243

EDIT: Working like a charm! Great job!!! I think you should add it to your amazing script collection, or in addition in the page of the Pausing RSS scroller for people like me :)