Adds character set parameter to htmlentities()