parent
9abe5e7e02
commit
bd12116477
|
@ -640,7 +640,8 @@ class FileBuffer(Buffer):
|
|||
f.close()
|
||||
self.store_checksum(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:
|
||||
data = ''
|
||||
self.codec = 'utf-8'
|
||||
|
|
Loading…
Reference in New Issue