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