summaryrefslogtreecommitdiff
path: root/python/scriptingprovider.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2022-04-13 10:45:06 -0400
committerPeter LaFosse <peter@vector35.com>2022-04-14 09:33:56 -0400
commit565cbc1ffcc094625a3f44024058454f57744aa0 (patch)
tree6457bf8aabd98fc7a6dc746a9424931d7babf802 /python/scriptingprovider.py
parentb503a9835226149c188dd8288b1cc1e9db6d154f (diff)
Fix issue where utf-8 strings couldn't be used or displayed in the python scripting console
Diffstat (limited to 'python/scriptingprovider.py')
-rw-r--r--python/scriptingprovider.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/scriptingprovider.py b/python/scriptingprovider.py
index 1aab55cb..8dfe3553 100644
--- a/python/scriptingprovider.py
+++ b/python/scriptingprovider.py
@@ -217,7 +217,7 @@ class ScriptingInstance:
def _complete_input(self, ctxt, text, state):
try:
if not isinstance(text, str):
- text = text.decode("charmap")
+ text = text.decode("utf-8")
return ctypes.cast(
self.perform_complete_input(text, state).encode("utf-8"), ctypes.c_void_p
).value # type: ignore
@@ -681,7 +681,7 @@ from binaryninja import *
code = code[:-2] + b'\n'
for line in code.split(b'\n'):
- self.interpreter.push(line.decode('charmap'))
+ self.interpreter.push(line.decode("utf-8"))
if self.active_view is not None:
tryNavigate = True
@@ -787,7 +787,7 @@ from binaryninja import *
if isinstance(text, str):
result = code.compile_command(text)
else:
- result = code.compile_command(text.decode("charmap"))
+ result = code.compile_command(text.decode("utf-8"))
except:
result = False