Fix file open mode in cchardetect script

This commit is contained in:
Craig de Stigter 2017-05-15 07:50:19 +12:00
parent b5a00f7abe
commit 186fb86132

View file

@ -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()