I have a form with a textarea. Users enter a block of text which is stored in a database.
Occasionally a user will paste text from Word containing smart quotes or em
The mysql database is using UTF-8 encoding. Likewise, the html pages that display the content are using UTF-8.
The content of the HTML can be in UTF-8, yes, but are you explicitly setting the content type (encoding) of your HTML pages (generated via PHP?) to UTF-8 as well? Try returning a Content-Type header of "text/html;charset=utf-8" or add tags to your HTMLs:
That way, the content type of the data submitted to PHP will also be the same.
I had a similar issue and adding the tag worked for me.