var encodedUri = encodeURI( "data:text/csv;charset=utf-8," + response.data);
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
if(!this.filter.periodFromLastSearch && !this.filter.periodToLastSearch)
{
link.setAttribute("download", `review.csv`);
}
else{
link.setAttribute("download", `review${this.filter.periodFromLastSearch.replace(/-/g,'')}-${this.filter.periodToLastSearch.replace(/-/g,'')}.csv`);
}
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
This is the way I create my csv file but when having characters like "åäö" I can't seem to get them into the actual file. I have tried using the respective codes \u00F6 in the string before encodeURI is done and after.
Anyone experienced this issue?