From 37590520c4064a333bf4e6566cfb1a9b2bb74fef Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 28 May 2010 13:32:36 +0000 Subject: [PATCH] fix for properly displaying unicode characters to sys.stdout (known python issue) --- sqlmap.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sqlmap.py b/sqlmap.py index 0cc1d05ab..59345443e 100755 --- a/sqlmap.py +++ b/sqlmap.py @@ -22,6 +22,8 @@ with sqlmap; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA """ +import codecs +import locale import os import sys import time @@ -30,6 +32,8 @@ import warnings warnings.filterwarnings(action="ignore", message=".*was already imported", category=UserWarning) +sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout) + try: import psyco psyco.full()