jquery.fileDownload icon indicating copy to clipboard operation
jquery.fileDownload copied to clipboard

Add accept-charset UTF-8 for POST requests

Open evil-shrike opened this issue 10 years ago • 1 comments

By default POST body should be supposed to be encoded in Latin-1/ISO-8859-1. So if we want to pass some data with POST requests via $.fileDownload there's a possibility that server will read that data as ISO-8859-1. Usually it's not that users want. It differs from ajax request via XHR which are always in UTF-8. So it would make sense to add explicit encoding for POST request. For the case when data are being sent via hidden form it should be specified in form attribute as:

<form enctype="application/x-www-form-urlencoded;charset=UTF-8">
OR
<form accept-charset="UTF-8">

evil-shrike avatar Oct 01 '15 11:10 evil-shrike

Sure, feel free to add that as an option!

johnculviner avatar Oct 01 '15 15:10 johnculviner