Skip to content

Commit

Permalink
Unix|Fixed: Set en_US locale for libc and Qt
Browse files Browse the repository at this point in the history
Doomsday expects U.S. English number and time formatting, so force the
en_US locale for both libc and Qt.
  • Loading branch information
skyjake committed Apr 15, 2012
1 parent 2ec0ee6 commit 2967846
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/dd_init.cpp
Expand Up @@ -131,7 +131,7 @@ int main(int argc, char** argv)
de::App dengApp(argc, argv, useGUI);

// Override the system locale (affects number/time formatting).
QLocale::setDefault(QLocale::c());
QLocale::setDefault(QLocale("en_US.UTF-8"));

// Metadata.
QApplication::setOrganizationDomain("dengine.net");
Expand Down
4 changes: 4 additions & 0 deletions doomsday/engine/unix/src/dd_uinit.c
Expand Up @@ -35,6 +35,7 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <locale.h>
#include <SDL.h>

#include <de/c_wrapper.h>
Expand Down Expand Up @@ -361,6 +362,9 @@ boolean DD_Unix_Init(int argc, char** argv)

memset(&app, 0, sizeof(app));

// We wish to use U.S. English formatting for time and numbers.
setlocale(LC_ALL, "en_US.UTF-8");

#if 0
// SDL lock key behavior: send up event when key released.
setenv("SDL_DISABLE_LOCK_KEYS", "1", true);
Expand Down

0 comments on commit 2967846

Please sign in to comment.