From 186fb86132a28ad6fbd93fdcedb25da64c3bc7db Mon Sep 17 00:00:00 2001 From: Craig de Stigter Date: Mon, 15 May 2017 07:50:19 +1200 Subject: [PATCH] Fix file open mode in cchardetect script --- bin/cchardetect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cchardetect b/bin/cchardetect index dbad06f..a71da0e 100755 --- a/bin/cchardetect +++ b/bin/cchardetect @@ -13,7 +13,7 @@ def read_chunks(f, chunk_size): def main(): parser = argparse.ArgumentParser() - parser.add_argument('files', nargs='+', help="Files to detect encoding of", type=argparse.FileType('r')) + parser.add_argument('files', nargs='+', help="Files to detect encoding of", type=argparse.FileType('rb')) parser.add_argument('--chunk-size', type=int, default=(256 * 1024)) args = parser.parse_args()