Exporting data with UTF-8 characters breaks (at least in Firefox), because window.btoa() works only with ISO-8859-1 characters. The fix that works for me is to replace:
Looks like the first one works better, the second one still sometimes causes URIError: malformed URI sequence. Even though there were no utf-8 characters in output. Weird.
Hi,
Exporting data with UTF-8 characters breaks (at least in Firefox), because window.btoa() works only with ISO-8859-1 characters. The fix that works for me is to replace:
return window.btoa(decodeURIComponent(encodeURIComponent(s)));
with (they both seem to work, I'm not sure which is better):
return window.btoa(unescape(encodeURIComponent(s)));
return window.btoa(decodeURIComponent(unescape(encodeURIComponent(s))));