mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 07:21:50 +08:00
Fix charts with utf8-bom encoding
This commit is contained in:
parent
9aa7375287
commit
c5ce5104f1
@ -62,9 +62,12 @@ class GdriveFile{
|
||||
}
|
||||
read(encoding){
|
||||
if(encoding){
|
||||
return this.arrayBuffer().then(response =>
|
||||
new TextDecoder(encoding).decode(response)
|
||||
)
|
||||
return this.arrayBuffer().then(response => {
|
||||
var reader = new FileReader()
|
||||
var promise = pageEvents.load(reader).then(event => event.target.result)
|
||||
reader.readAsText(new Blob([response]), encoding)
|
||||
return promise
|
||||
})
|
||||
}else{
|
||||
return gpicker.downloadFile(this.id)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user