Use UTF-8 for console I/O on Windows

This commit is contained in:
Mike Gelfand
2015-04-21 10:07:57 +00:00
parent 7ce0ebfee7
commit c1b10abe0f
9 changed files with 44 additions and 36 deletions

View File

@@ -636,8 +636,8 @@ cleanup:
}
int
main (int argc,
char ** argv)
tr_main (int argc,
char * argv[])
{
const dtr_callbacks cb =
{
@@ -654,10 +654,6 @@ main (int argc,
tr_variant * const settings = &arg.settings;
const char ** const configDir = &arg.configDir;
#ifdef _WIN32
tr_win32_make_args_utf8 (&argc, &argv);
#endif
key_pidfile = tr_quark_new ("pidfile", 7);
/* load settings from defaults + config file */

View File

@@ -2401,17 +2401,14 @@ getHostAndPortAndRpcUrl (int * argc, char ** argv,
}
int
main (int argc, char ** argv)
tr_main (int argc,
char * argv[])
{
int port = DEFAULT_PORT;
char * host = NULL;
char * rpcurl = NULL;
int exit_status = EXIT_SUCCESS;
#ifdef _WIN32
tr_win32_make_args_utf8 (&argc, &argv);
#endif
if (argc < 2) {
showUsage ();
return EXIT_FAILURE;