From 16d2ef1ea9bc35e0a30806e1406a9aa6be9d409f Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 21 Sep 2020 11:23:06 +0200 Subject: DolphinQt: Handle non-ASCII characters in Windows cmd arguments CommandLineParse expects UTF-8 strings. (QApplication, on the other hand, seems to be designed so that you can pass in the char** argv untouched on Windows and get proper Unicode handling.) --- Source/Core/WinUpdater/Main.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'Source/Core/WinUpdater/Main.cpp') diff --git a/Source/Core/WinUpdater/Main.cpp b/Source/Core/WinUpdater/Main.cpp index 6afb807941..567486f00a 100644 --- a/Source/Core/WinUpdater/Main.cpp +++ b/Source/Core/WinUpdater/Main.cpp @@ -16,26 +16,6 @@ #include "UpdaterCommon/UI.h" #include "UpdaterCommon/UpdaterCommon.h" -namespace -{ -std::vector CommandLineToUtf8Argv(PCWSTR command_line) -{ - int nargs; - LPWSTR* tokenized = CommandLineToArgvW(command_line, &nargs); - if (!tokenized) - return {}; - - std::vector argv(nargs); - for (int i = 0; i < nargs; ++i) - { - argv[i] = WStringToUTF8(tokenized[i]); - } - - LocalFree(tokenized); - return argv; -} -}; // namespace - int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) { if (lstrlenW(pCmdLine) == 0) -- cgit v1.2.3