mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-17 00:10:03 -04:00
Windows *needs* a UTF-8 locale set to correctly handle UTF-8 output
This commit is contained in:
parent
b82dd1d94f
commit
f850641657
@ -84,8 +84,13 @@ int safe_main(std::function<int(void)> fn) {
|
||||
#ifndef _WIN32
|
||||
folly::symbolizer::installFatalSignalHandler();
|
||||
#endif
|
||||
std::locale::global(std::locale(""));
|
||||
std::setlocale(LC_ALL, "");
|
||||
#ifdef _WIN32
|
||||
char const* locale = "en_US.utf8";
|
||||
#else
|
||||
char const* locale = "";
|
||||
#endif
|
||||
std::locale::global(std::locale(locale));
|
||||
std::setlocale(LC_ALL, locale);
|
||||
|
||||
setup_terminal();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user