From 7463bbb0ef624e85c0ca3cb60fe1991d222c983a Mon Sep 17 00:00:00 2001 From: WolfHawkeAI <76835179+WolfHawkeAI@users.noreply.github.com> Date: Mon, 1 Jul 2024 09:57:06 +0300 Subject: [PATCH] Make UTF-8 compatible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is so that we can use strings with characters not in cp1252, such as Turkish characters ş ı ğ. --- elevate/windows.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elevate/windows.py b/elevate/windows.py index af9ea43..2cf21c8 100644 --- a/elevate/windows.py +++ b/elevate/windows.py @@ -71,8 +71,8 @@ def elevate(show_console=True, graphical=True): fMask=SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE, hwnd=None, lpVerb=b'runas', - lpFile=sys.executable.encode('cp1252'), - lpParameters=subprocess.list2cmdline(sys.argv).encode('cp1252'), + lpFile=sys.executable.encode('utf-8'), + lpParameters=subprocess.list2cmdline(sys.argv).encode('utf-8'), nShow=int(show_console)) if not ShellExecuteEx(ctypes.byref(params)):