For those of you who are unfortunate enough (like me) to work in Windows environment, and try to set the locale to a language _and_ to UTF-8 charset, and were unable to do it, here is a workaround.
For example to output the date in hungarian with UTF-8 charset, this will work:
$dateString = "%B %d., %A";
setlocale(LC_ALL,'hungarian');
$res=strftime($dateString);
echo(iconv('ISO-8859-1', 'UTF-8', $res));
If anybody knows how to set the locale on Windows to the equivalent of "hu_HU.UTF-8" on unix, please do tell me.