From 9a8cf1b7fc2eb7ac15d993ba6be0593349037792 Mon Sep 17 00:00:00 2001 From: zed Date: Mon, 24 Aug 2015 19:24:26 +0300 Subject: [PATCH] file(1) does not include 0x7f in text See [How can I detect if a file is binary (non-text) in python?](http://stackoverflow.com/a/7392391/4279) --- grin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grin.py b/grin.py index de9703d..f993b95 100755 --- a/grin.py +++ b/grin.py @@ -24,7 +24,7 @@ POST = 1 # Use file(1)'s choices for what's text and what's not. -TEXTCHARS = ''.join(map(chr, [7,8,9,10,12,13,27] + range(0x20, 0x100))) +TEXTCHARS = ''.join(map(chr, [7,8,9,10,12,13,27] + range(0x20, 0x7f) + range(0x80, 0x100))) ALLBYTES = ''.join(map(chr, range(256))) COLOR_TABLE = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan',