eligrey / eligrey/FileSaver.js

charset=utf-8 in type has side effect at least in iOS Safari

Open
#595 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
22k
Forks
4.3k
PR merge metrics
No merged PRs in 30d

Description

`autoBom: true` checks blob.type contains `charset=utf-8`, but it has side effect in iOS.
Saving `text/csv` file in `iOS 12.2 Simulator` with charset shows differently than that of without charset.

`type === 'text/csv'`

スクリーンショット 2019-08-29 16 41 24

`type === 'text/csv; charset=utf-8'`

スクリーンショット 2019-08-29 16 41 49

(This patch was used for apply autoBom in iOS Safari.)
https://github.com/ypresto/FileSaver.js/commit/f01265bbc0c2922121bd2ee6ba94c1fe28aab524

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.