Skip to content

Commit

Permalink
Use default minimal ANSI locale.
Browse files Browse the repository at this point in the history
Despite requesting UTF-8, MinGW appears to have been using
the 'C' locale the whole time, so we should enforce that here
even if UCRT's setlocale() actually works as advertised.
  • Loading branch information
tez011 committed Mar 31, 2024
1 parent 14db15e commit dcab524
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main.cpp
Expand Up @@ -102,8 +102,7 @@ main(int argc, char *argv[]) {
task_pool_util::TaskPool::task_id_t force_shutdown = nullptr;

#ifdef _WIN32
// Switch default C standard library locale to UTF-8 on Windows 10 1803+
setlocale(LC_ALL, ".UTF-8");
setlocale(LC_ALL, "C");
#endif

#pragma GCC diagnostic push
Expand Down

0 comments on commit dcab524

Please sign in to comment.