I'm working on a react-native project which is dependent of this lib. But I found the readBlobAsText does not respect the charset in Content-Type, which throws error when the charset is not utf8-encoded.
the problematic code below:
functionreadBlobAsText(blob){varreader=newFileReader()varpromise=fileReaderReady(reader)reader.readAsText(blob)// <-- FilerReader accept a second param 'encode', which can be retrieved from the response header.returnpromise}
I'm working on a react-native project which is dependent of this lib. But I found the
readBlobAsTextdoes not respect thecharsetinContent-Type, which throws error when the charset is not utf8-encoded.the problematic code below:
And here is my code suggestion:
The text was updated successfully, but these errors were encountered: