print htmlentities('éèeë');

=> éèeë


PS: nell'altro tuo thread ti ho fatto una domanda a cui non hai risposto.