Reply to Problem with date encoding with UTF8 / #4033

Damn... according to MSDN:

The set of available languages, country/region codes, and code pages includes all those supported by the Win32 NLS API except code pages that require more than two bytes per character, such as UTF-7 and UTF-8. If you provide a code page like UTF-7 or UTF-8, setlocale will fail, returning NULL.

So apparently gmstrftime() can't be used to produce correctly utf-8 encoded strings under Windows. We need to convert them explicitly with utf8_encode(). It's really a shame.