From 37b8d0c480ed3f9f4b8b9a566d80ce6a97f23f70 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 28 May 2010 11:48:44 +0000 Subject: [PATCH] utf8 decoding of program arguments --- lib/parse/cmdline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 518503b14..376903570 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -29,6 +29,7 @@ from optparse import OptionGroup from optparse import OptionParser from optparse import SUPPRESS_HELP +from lib.core.convert import utf8decode from lib.core.data import logger from lib.core.settings import VERSION_STRING @@ -462,7 +463,7 @@ def cmdLineParser(): parser.add_option_group(windows) parser.add_option_group(miscellaneous) - (args, _) = parser.parse_args() + (args, _) = parser.parse_args([utf8decode(arg) for arg in sys.argv]) if not args.direct and not args.url and not args.list and not args.googleDork and not args.configFile and not args.requestFile and not args.updateAll: errMsg = "missing a mandatory parameter ('-d', '-u', '-l', '-r', '-g', '-c' or '--update'), "