Removed setlocale as it does not work on Windows.