[w3c/FileAPI] Add option to Blob constructor to skip UTF-8 encoding (#102)

Step 4.2.1 of the [Blob constructor algorithm](https://www.w3.org/TR/FileAPI/#constructorBlob) is to UTF-8 encode the source string. This creates problems if the source string is the set of literal bytes (e.g. is a "binary string"). (See https://stackoverflow.com/questions/23795034 for example.)

It would be nice to have a new option to the constructor, like `literal` (defaults to `false`), or `utf8encode` (defaults to `true`) to avoid having to manually convert the string to a BufferSource (Uint8Array).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/FileAPI/issues/102

Received on Friday, 15 June 2018 17:09:14 UTC