setlocale(LC_ALL,'ru_RU.CP1251','ru_RU','rus');
$content=strftime("%A %d %B %Y", mktime(0, 0, 0, 12, 22, 1978));
echo iconv('Windows-1251','utf-8',$content);
echo '<br>';
echo html_entity_decode(htmlentities($content, ENT_QUOTES, "Windows-1251"), ENT_QUOTES , "utf-8");