Skip to content
Extraits de code Groupes Projets
Valider 9f8e25ed rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

Force LC_CTYPE to en_US.UTF-8 on OS X

When run from an app bundle the locale environment variables are unset,
and the default locale settings are bogus as a result.
parent 4cb5d411
Branches
Étiquettes
Aucune requête de fusion associée trouvée
...@@ -202,8 +202,13 @@ FrameMain::FrameMain (wxArrayString args) ...@@ -202,8 +202,13 @@ FrameMain::FrameMain (wxArrayString args)
setlocale(LC_NUMERIC, "C"); setlocale(LC_NUMERIC, "C");
#endif #endif
#ifdef __APPLE__ #ifdef __APPLE__
// Apple's wprintf() and family breaks with CTYPE set to "C" // When run from an app bundle, LC_CTYPE defaults to "C", which breaks on
setlocale(LC_CTYPE, ""); // anything involving unicode and in some cases number formatting.
// The right thing to do here would be to query CoreFoundation for the user's
// locale and add .UTF-8 to that, but :effort:
LOG_D("locale") << setlocale(LC_ALL, 0);
setlocale(LC_CTYPE, "en_US.UTF-8");
LOG_D("locale") << setlocale(LC_ALL, 0);
#endif #endif
StartupLog("Initializing context models"); StartupLog("Initializing context models");
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter