| Index: runtime/bin/main.cc
|
| diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
|
| index bd5e8779e5c51d3f128b5ceee8775db8d59a5b60..cebd7e676ceb80d2f5c2a101db8992316311f70d 100644
|
| --- a/runtime/bin/main.cc
|
| +++ b/runtime/bin/main.cc
|
| @@ -404,24 +404,6 @@ static bool ProcessMainOptions(const char* option,
|
| }
|
|
|
|
|
| -// Convert all the arguments to UTF8. On Windows, the arguments are
|
| -// encoded in the current code page and not UTF8.
|
| -//
|
| -// Returns true if the arguments are converted. In that case
|
| -// each of the arguments need to be deallocated using free.
|
| -static bool Utf8ConvertArgv(int argc, char** argv) {
|
| - int unicode_argc = 0;
|
| - wchar_t** unicode_argv = ShellUtils::GetUnicodeArgv(&unicode_argc);
|
| - if (unicode_argv == NULL) return false;
|
| - for (int i = 0; i < unicode_argc; i++) {
|
| - wchar_t* arg = unicode_argv[i];
|
| - argv[i] = StringUtils::WideToUtf8(arg);
|
| - }
|
| - ShellUtils::FreeUnicodeArgv(unicode_argv);
|
| - return true;
|
| -}
|
| -
|
| -
|
| // Parse out the command line arguments. Returns -1 if the arguments
|
| // are incorrect, 0 otherwise.
|
| static int ParseArguments(int argc,
|
| @@ -893,7 +875,7 @@ void main(int argc, char** argv) {
|
|
|
| // On Windows, the argv strings are code page encoded and not
|
| // utf8. We need to convert them to utf8.
|
| - bool argv_converted = Utf8ConvertArgv(argc, argv);
|
| + bool argv_converted = ShellUtils::GetUtf8Argv(argc, argv);
|
|
|
| // Parse command line arguments.
|
| if (ParseArguments(argc,
|
|
|