From 9f7e865196d888af681afc50271c19609edad58a Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 29 Jan 2013 07:10:35 -0800 Subject: [PATCH] Set the default string encoding to UTF-8 --- aegisub/src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aegisub/src/main.cpp b/aegisub/src/main.cpp index 9715ce2f8..87473a71b 100644 --- a/aegisub/src/main.cpp +++ b/aegisub/src/main.cpp @@ -67,6 +67,7 @@ #include #include +#include #include #include @@ -112,6 +113,10 @@ bool AegisubApp::OnInit() { SetAppName("aegisub"); #endif + // Set the global locale to the utf-8 version of the current locale + std::locale::global(boost::locale::generator().generate("")); + boost::filesystem::path::imbue(std::locale()); + // Pointless `this` capture required due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51494 agi::dispatch::Init([this](agi::dispatch::Thunk f) { wxThreadEvent *evt = new wxThreadEvent(EVT_CALL_THUNK);