In your HTML page add in head section:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Also you can do:
Changing the server encoding
PHP header() function
The simplest way to handle this problem is to send the encoding yourself, via your programming language. Since you're using HTML
Purifier, I'll assume PHP, although it's not too difficult to do
similar things in other languages. The appropriate code is:
header('Content-Type:text/html; charset=UTF-8');
...replacing UTF-8 with whatever your embedded encoding is. This code
must come before any output, so be careful about stray whitespace in
your application (i.e., any whitespace before output excluding
whitespace within tags).
PHP ini directive
PHP also has a neat little ini directive that can save you a header call: default_charset. Using this code:
ini_set('default_charset', 'UTF-8');
...will also do the trick. If PHP is running as an Apache module (and
not as FastCGI, consult phpinfo() for details), you can even use
htaccess to apply this property across many PHP files:
php_value default_charset "UTF-8"
As with all INI directives, this can also go in your php.ini file.
Some hosting providers allow you to customize your own php.ini file,
ask your support for details. Use:
default_charset = "utf-8"