parent
c47fca63d6
commit
7320b7ef65
|
@ -639,6 +639,7 @@ class FileBuffer(Buffer):
|
|||
data = f.read()
|
||||
f.close()
|
||||
self.store_checksum(data)
|
||||
data = self.read_filter(data)
|
||||
self.codec = chardet.detect(data)['encoding'].lower()
|
||||
else:
|
||||
data = ''
|
||||
|
@ -654,8 +655,6 @@ class FileBuffer(Buffer):
|
|||
if '\t' in data: self.writetabs = True
|
||||
self.nl = self._detect_nl_type(data)
|
||||
|
||||
data = self.read_filter(data)
|
||||
|
||||
if '\x00' in data[:8192]:
|
||||
raise BinaryDataException("binary files are not supported")
|
||||
|
||||
|
|
Loading…
Reference in New Issue