If you need something that converts &#[0-9]+ entities to UTF-8, this is simple and works:
<?php
/* Entity crap. /
$input = "Fovič";
$output = preg_replace_callback("/(&#[0-9]+;)/", function($m) { return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES"); }, $input);
/* Plain UTF-8. */
echo $output;
?>