#include <set>
#include <csignal>
+#include <clocale>
using namespace caspar;
gen.categories(boost::locale::codepage_facet);
std::locale::global(gen(""));
+
+ // sscanf is used in for example FFmpeg where we want decimals to be parsed as .
+ std::setlocale(LC_ALL, "C");
}
void print_info()
if(boost::iequals(wcmd, L"EXIT") || boost::iequals(wcmd, L"Q") || boost::iequals(wcmd, L"QUIT") || boost::iequals(wcmd, L"BYE"))
{
+ CASPAR_LOG(info) << L"Received message from Console: " << wcmd << L"\\r\\n";
should_wait_for_keypress = true;
shutdown_server_now.set_value(false); //false to not restart
break;
// Create server object which initializes channels, protocols and controllers.
std::unique_ptr<server> caspar_server(new server(shutdown_server_now));
+ // For example CEF resets the global locale, so this is to reset it back to "our" preference.
+ setup_global_locale();
+
// Print environment information.
print_system_info(caspar_server->get_system_info_provider_repo());
CASPAR_LOG(info) << "Successfully shutdown CasparCG Server.";
- if (!should_wait_for_keypress)
+ if (should_wait_for_keypress)
wait_for_keypress();
}
catch(const boost::property_tree::file_parser_error& e)