Blob.js icon indicating copy to clipboard operation
Blob.js copied to clipboard

Invalid blobSupported detection

Open krzbor opened this issue 5 years ago • 6 comments

The problem is the line: blobSupported = new Blob (['ä']). size === 2; // Check if Blob constructor supports ArrayBufferViews Check This and This If the character encoding is Windows-1250, then blobSupported is FALSE!

krzbor avatar Apr 25 '19 22:04 krzbor

could we change ['ä'] to ['\u00e4'] maybe?

jimmywarting avatar Apr 30 '19 08:04 jimmywarting

Now it is working! I checked on FF, Chrome, Edge. I am asking you to introduce this amendment to blob.js.

krzbor avatar May 01 '19 18:05 krzbor

Created a PR...

But why don't you switch to utf8? Using any other then utf8 seems just ... well ... unwise?

http://codel10n.com/why-utf8-is-best-encoding-for-your-customers/

jimmywarting avatar May 01 '19 18:05 jimmywarting

The WEB application was created many years ago. Its improvement is quite complex.

krzbor avatar May 02 '19 08:05 krzbor

Will the change be introduced to the official version of blob.js? I am using jsPDF, which uses blob.js.

krzbor avatar May 11 '19 11:05 krzbor

eligrey is not responseable for any npm package, you should contact the others

jimmywarting avatar May 11 '19 12:05 jimmywarting