Fix unspecified stdin encoding.
This commit is contained in:
parent
e543eeaf58
commit
2040928e28
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue