Il codice da mettere rimane sempre UTF-8. Va scritto nel tag html sotto meta
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
in teoria dovrebbe essere quello.
Poi per htmlentities, dipende da cosa devi fare.
Prova ad usare htmlspecialchars:
http://www.php.net/manual/en/functio...ecialchars.php