Fix unspecified stdin encoding.

This commit is contained in:
Yoan Blanc 2016-06-06 18:29:59 +02:00
parent e543eeaf58
commit 2040928e28
1 changed files with 2 additions and 1 deletions

View File

@ -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: