We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d0a3a4 commit dc59ce4Copy full SHA for dc59ce4
src/main.cpp
@@ -31,6 +31,15 @@ BC_USE_LIBBITCOIN_MAIN
31
*/
32
int bc::main(int argc, char* argv[])
33
{
34
+#ifdef _MSC_VER
35
+ if (_setmode(_fileno(stdin), _O_U8TEXT) == -1)
36
+ throw std::exception("Could not set STDIN to utf8 mode.");
37
+ if (_setmode(_fileno(stdout), _O_U8TEXT) == -1)
38
+ throw std::exception("Could not set STDOUT to utf8 mode.");
39
+ if (_setmode(_fileno(stderr), _O_U8TEXT) == -1)
40
+ throw std::exception("Could not set STDERR to utf8 mode.");
41
+#endif
42
+
43
return bc::server::dispatch(argc, const_cast<const char**>(argv),
44
bc::cin, bc::cout, bc::cerr);
45
}
0 commit comments