promise-file-reader icon indicating copy to clipboard operation
promise-file-reader copied to clipboard

bug: fileReader.readAsText(file, encoding), encoding argument lost!

Open En777 opened this issue 6 years ago • 1 comments

promise-file-reader.js: source code:

function readAsText (file) {
  return readAs(file, 'Text')
}

Syntax: instanceOfFileReader.readAsText(blob[, encoding]); your code will makes a bug: passed encoding param will lost!

reference: https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsText

En777 avatar Jan 18 '19 06:01 En777

Thanks for reporting. PRs welcome if you want to fix, otherwise I'll look at it sometime.

jahredhope avatar Jan 18 '19 07:01 jahredhope