Skip to content

Commit

Permalink
Fixed|Linux: Set environment to force en_US locale, C numerics
Browse files Browse the repository at this point in the history
We really do want to use en_US/C locale for formatting numbers in .cfg files. Apparently calling
setlocale() was no longer enough on Ubuntu 20.04.
  • Loading branch information
skyjake committed May 10, 2020
1 parent 841be0c commit d20fc9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doomsday/sdk/libcore/src/core/app.cpp
Expand Up @@ -162,6 +162,8 @@ DENG2_PIMPL(App)
#ifdef UNIX
{
// We wish to use U.S. English formatting for time and numbers (in libc).
setenv("LC_ALL", "en_US.UTF-8", 1);
setenv("LC_NUMERIC", "C", 1);
setlocale(LC_ALL, "en_US.UTF-8");
setlocale(LC_NUMERIC, "C");
}
Expand Down

0 comments on commit d20fc9a

Please sign in to comment.