I am using [HTML Purifier](http://htmlpurifier.org) in my PHP project and am having trouble getting it to work properly with user input.

I am having users enter in HTML using a WYSIWYG editor ([TinyMCE](http://tinymce.moxiecode.com/)), but whenever a user enters in the HTML entity `&nbsp;` (non-breaking space) it gets saved into the database as this weird foreign character (`Â`).

However, the thing is, when I edit the saved entry using the WYSIWYG editor it gets displayed properly as `&nbsp;`. It also functions properly when displayed, only that in the source code it appears as a real space, but not the non-breaking space character.

Also, in the MySQL database it displays as the weird foreign character.

I read the doc about [Unicode and HTML Purifier](http://htmlpurifier.org/docs/enduser-utf8.html) and changed my database and web page encoding to be UTF-8, but I am still having problems with the non-breaking space character not being mangled. The other HTML entities, such as `&lt;` and `&gt;`, get saved as `<` and `>`, but why not `&nbsp;`?