[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

… unencoding troubles with FeedTools

Robert Jones

12/23/2006 7:50:00 PM

I've hunted around for a solution to this one, but it's really hard to
find, because the string gets munched in google - try searching for
… !

When using FeedTools, I'm finding that some feeds are giving me encoded
strings like this, and I can't seem to unencode them. Stuff like '
is ok- FeedTools::HtmlHelper.unescape_entities deals fine with them, but
these frickin … things are driving me nuts.

Anyone able to give me an early Christmas present by helping me out?

--
Posted via http://www.ruby-....

4 Answers

Michael Moen

12/24/2006 2:41:00 AM

0

Robert Jones wrote:
> I've hunted around for a solution to this one, but it's really hard to
> find, because the string gets munched in google - try searching for
> … !
>
> Anyone able to give me an early Christmas present by helping me out?

Robert- What version of FeedTools are you using and can you provide a
URL that has these entities in it?

--
Posted via http://www.ruby-....

Robert Jones

12/24/2006 10:49:00 AM

0

Michael Moen wrote:
> Robert Jones wrote:
>> I've hunted around for a solution to this one, but it's really hard to
>> find, because the string gets munched in google - try searching for
>> … !
>>
>> Anyone able to give me an early Christmas present by helping me out?
>
> Robert- What version of FeedTools are you using and can you provide a
> URL that has these entities in it?

Thanks for listening Michael - sorry for not giving more details
initially.

I'm using FeedTools from a gem install - 0.2.26

A feed that's being bad is http://grahamdickie.edublogs... - It's
the title of the post "I can't believe it's not..". There are others,
but this one is definitely doing it!

Cheers

--
Posted via http://www.ruby-....

Michael Moen

12/24/2006 4:56:00 PM

0

Robert Jones wrote:
> I'm using FeedTools from a gem install - 0.2.26
>
> A feed that's being bad is http://grahamdickie.edublogs... - It's
> the title of the post "I can't believe it's not..". There are others,
> but this one is definitely doing it!

Robert- I tried this in Feed Harvest, it's using FeedTools from svn with
an unrelated patch. Here's a shot of it in the UI
http://moensolutions.com/fh-e...

You may want to try building your gem from the source, I'm not sure why
they aren't in sync, other than I know Bob has been busy with other
prjects.

svn co svn://rubyforge.org/var/svn/feedtools/trunk feedtools
cd feedtools
rake gem
sudo gem install pkg/feedtools-0.2.27.gem

Good Luck

--
Posted via http://www.ruby-....

Suraj Kurapati

12/26/2006 6:41:00 PM

0

Robert Jones wrote:
> I can't seem to unencode them. Stuff like '
> is ok- FeedTools::HtmlHelper.unescape_entities deals fine with them, but
> these frickin … things are driving me nuts.
>
> Anyone able to give me an early Christmas present by helping me out?

irb(main):005:0> "n …".gsub %r{&#(\d+);} do
irb(main):006:1* [Integer($1)].pack('U*')
irb(main):007:1> end
=> "n \342\200\246"
irb(main):008:0> puts "n \342\200\246"
n â?¦
=> nil

--
Posted via http://www.ruby-....