views:

154

answers:

0

I'm grabbing an XML feed that claims to be

<?xml version="1.0" encoding="ISO-8859-1"?>

with Nokogiri and inserting the text into mysql with activerecord (OUTSIDE of rails). Using HTMLEntities to decode.

Here is an example

(&#147;LON: SDM&#148;)

I can't seem to handle some of these html special characters properly. When redisplaying (PHP front end...) things look like:

(LON: SDM)

i'm geting the same on &#128; characters.

What do i need to do to handle these properly. My mysql appears to be properly set to utf8. And i'm calling

ActiveRecord::Base.connection.execute 'SET NAMES utf8'

after the base connection. Not sure where to go from here?