mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove UTF-8 BOM from .py files when loading from the zip plugin
This commit is contained in:
parent
defa85e918
commit
0d3a80e850
@ -158,7 +158,7 @@ class CalibrePluginLoader:
|
||||
except Exception:
|
||||
# Maybe the zip file changed from under us
|
||||
src = zf.read(zinfo.filename)
|
||||
return src.decode('utf-8').replace('\r\n', '\n')
|
||||
return src.decode('utf-8-sig').replace('\r\n', '\n')
|
||||
|
||||
def get_filename(self, fullname):
|
||||
return self.filename
|
||||
|
Loading…
x
Reference in New Issue
Block a user