Io conosco

$text = mb_convert_encoding($text,'HTML-ENTITIES',$from_enc);

però non tutti gli host abilitano mbstring sul server.