I’m in the middle of moving some sites over from a self hosting VPS to Heroku and had some problems with the text encodings. Everything worked fine on the old site and on my local machine, but after a heroku db:push (copying my local MySQL database to Heroku’s Postgres), all special UTF-8 characters were not displaying correctly.

After some googling and some testing I found this solution (that is, make sure Rails and MySQL is all UTF-8), but it wasn’t enough to properly import the old data. After more googling, this worked for me: