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

Fix codecvt errors on OS X

When launching Aegisub from Finder (but not via open), using the UTF-8
version of the locale breaks things for whatever reason, but fortunately
it's unneccesary as paths on OS X are always UTF-8 even if the locale
isn't.

Closes #1685.
parent b6e616c5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -118,7 +118,15 @@ bool AegisubApp::OnInit() { ...@@ -118,7 +118,15 @@ bool AegisubApp::OnInit() {
// Set the global locale to the utf-8 version of the current locale // Set the global locale to the utf-8 version of the current locale
std::locale::global(boost::locale::generator().generate("")); std::locale::global(boost::locale::generator().generate(""));
#ifndef __APPLE__
// Boost.FileSystem always uses UTF-8 for paths on OS X (since paths
// actually are required to be UTF-8 strings rather than just opaque binary
// blobs like on Linux), so there's no need to imbue the new locale and in
// fact it actively breaks things for unknown reasons when launching the
// app from Finder (but not from the command line).
boost::filesystem::path::imbue(std::locale()); boost::filesystem::path::imbue(std::locale());
#endif
// Pointless `this` capture required due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51494 // Pointless `this` capture required due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51494
agi::dispatch::Init([this](agi::dispatch::Thunk f) { agi::dispatch::Init([this](agi::dispatch::Thunk f) {
......
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