Voting

: eight plus zero?
(Example: nine)

The Note You're Voting On

szepeshazi at gmail dot com
18 years ago
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.

<< Back to user notes page

To Top