I converted all my sites to UTF-8 and it was relatively painless. However, on one of my sites, I kept seeing legal UTF-8 characters turning into gibberish. It happened after entering UTF-8, submitting a form and then redisplaying the values in an edit box.
I know that all my pages are using UTF-8, and also that my database stores the text as UTF-8.
The thing that I overlooked is that, because I’m writing text to an input box, I’m using PHP’s htmlentities function to handle special characters, and the default character set used by that function is ISO-8859-1. I had to change my PHP command from
echo htmlentities($field);
to
echo htmlentities($field, ENT_COMPAT, 'UTF-8');
Once I verified that worked, I searched my whole codebase for htmlentities and made sure they were all using ‘UTF-8’


You can also just change you php.ini file. After you make the change, be sure to restart your web browser.
;default_charset = “iso-8859-1”
↓
default_charset = “utf-8”
I mean “restart your web *server*”.