Use cp1252 in setlocale() for Windows

To work around #8665.