diff --git a/gitinspector/terminal.py b/gitinspector/terminal.py index 4be4bed..51ab38f 100644 --- a/gitinspector/terminal.py +++ b/gitinspector/terminal.py @@ -118,8 +118,9 @@ def convert_command_line_to_utf8(): try: argv = [] + encoding = sys.stdin.encoding or sys.getdefaultencoding() for arg in sys.argv: - argv.append(arg.decode(sys.stdin.encoding, "replace")) + argv.append(arg.decode(encoding, "replace")) return argv except AttributeError: