… unencoding troubles with FeedTools

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-forum.com/.

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-forum.com/.

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-forum.com/.

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.org/feed/ - 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-forum.com/.

Robert Jones wrote:

I'm using FeedTools from a gem install - 0.2.26

A feed that's being bad is http://grahamdickie.edublogs.org/feed/ - 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-elipsis.png

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-forum.com/.