Forum: Ruby on Rails Rubyful-soup and 'malformed utf-8 character'

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4d8b13b54ae2fabfffd5537b04c7369c?d=identicon&s=25 Scott Fortmann-Roe (Guest)
on 2006-05-17 12:35
(Received via mailing list)
Hi Guys,

I am trying to use Rubyful-soup for a simple webpage modification
project. The issue is that when I try to display the modified html
(generated by @soup.to_s) using RJS, an error pops up saying
'malformed utf-8 character'.

I can fix this by using @soup.to_s.toutf8 but that causes some of the
characters in the document to be messed up (ie '&nbsp becomes %nbsp').

Any ideas how to fix this, (or alternativly a different html parser,
rubyful soup seems the easiest one out there to use.

Thanks a lot,
Scott
This topic is locked and can not be replied to.