eligrey / Blob.js

An HTML5 Blob implementation
Other
1.15k stars 605 forks source link

Invalid blobSupported detection #68

Open krzbor opened 5 years ago

krzbor commented 5 years ago

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!

jimmywarting commented 5 years ago

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

krzbor commented 5 years ago

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

jimmywarting commented 5 years ago

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/

krzbor commented 5 years ago

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

krzbor commented 5 years ago

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

jimmywarting commented 5 years ago

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