fix: fail on buggy utf-8

pull/38/head
Raphaël Vinot 2018-05-06 21:58:47 +02:00
parent 27d4f4555b
commit 4c159f17de
1 changed files with 1 additions and 1 deletions

View File

@ -353,7 +353,7 @@ if __name__ == '__main__':
sys.exit(-1)
if args.infile:
pseudofile = BytesIO(args.infile.read().encode())
pseudofile = BytesIO(args.infile.read().encode('utf8', 'surrogateescape'))
elif args.read:
# read from tempfile
with open(args.read, 'rb') as f: