From 9530fbacfaf2930d9bab1dc8a3ce4e0af4297b06 Mon Sep 17 00:00:00 2001 From: "gergely.erdelyi" Date: Tue, 21 Jul 2009 18:10:02 +0000 Subject: [PATCH] init.py: Replace non-printable characters in stdout/stderr going to the message window --- python/init.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/init.py b/python/init.py index 352980a..2fb709e 100644 --- a/python/init.py +++ b/python/init.py @@ -98,6 +98,8 @@ class MyStdOut: Dummy file-like class that receives stout and stderr """ def write(self, text): + # Swap out the unprintable characters + text = text.decode('ascii', 'replace').encode('ascii', 'replace') _idaapi.msg(text.replace("%", "%%")) def flush(self):