I have an application with a browser page that allows upload of CSV to Google Drive via V2 of the api. It is only handling ASCII (I get "failed to execute btoa / string to be encoded contains characters outside the Latin1 range").
I've updated my code so that the content-type is now "text/csv;charset=UTF-8;". I am still using content-transfer-encoding of base64.
In multiple places on the web, I found recommendations of using btoa(unescape(encodeURIComponent(data))). Previously, the code was only doing btoa(data). It seems to work, though I have not tested it exhaustively.
I understand that unescape is considered in a precarious light relative to ECMA-262. Here are the questions: