… unencoding troubles with FeedTools

R

Robert Jones

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?
 
M

Michael Moen

Robert said:
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?
 
R

Robert Jones

Michael said:
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
 
M

Michael Moen

Robert said:
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
 
S

Suraj Kurapati

Robert said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top