Imported MyBB database character encoding issue

Yes. That’s my guess. I’m working with an import now with similar problems. Most of them are things like curly quotes and emdashes.

It’s far from easy, but you you can do some post-processing that either does a force_encoding or attempts to replace the characters one-by-one.

Something like

Post.all.each do |post|
  post.raw = post.raw.force_encoding('utf-8').encode("Windows-1252").force_encoding('utf-8')
  post.save!
  post.rebake!
end

But I’d test it extensively on a staging site before you run it on your live data.