parent
9abe5e7e02
commit
bd12116477
|
@ -640,7 +640,8 @@ class FileBuffer(Buffer):
|
||||||
f.close()
|
f.close()
|
||||||
self.store_checksum(data)
|
self.store_checksum(data)
|
||||||
data = self.read_filter(data)
|
data = self.read_filter(data)
|
||||||
self.codec = chardet.detect(data)['encoding'].lower()
|
codec = chardet.detect(data)['encoding'] or 'utf-8'
|
||||||
|
self.codec = codec.lower()
|
||||||
else:
|
else:
|
||||||
data = ''
|
data = ''
|
||||||
self.codec = 'utf-8'
|
self.codec = 'utf-8'
|
||||||
|
|
Loading…
Reference in New Issue