Helo I have a problem with diacritics .. in Mysql it's fine i set the utf8_general_ci  you cand see in this picture

in my website it's fine you can see
But when i export to csv file don't work.. Another file with diacritic reads my excel but this not.
I use this code for export
function doCsv(){
    var table = document.getElementById("exportTable").innerHTML;
    var data = table.replace(/<thead>/g,'').replace(/<\/thead>/g,'')
    .replace(/<tbody>/g,'').replace(/<\/tbody>/g,'')
    .replace(/<tr role="row" class="odd">/g,'').replace(/<tr role="row" class="even">/g,'').replace(/<\/tr>/g,'\r\n')
    .replace(/<th style="background-color:#6699ff;">/g,'').replace(/<\/th>/g,';')
    .replace(/<td>/g,'').replace(/<\/td>/g,';')
    .replace(/\t/g,'').replace(/\n/g,'');
    var link = document.createElement('a');
    link.download = "exportToCSV.csv";
    link.href = "data:application/csv," + escape(data);
    link.click();
And if i put the alert it keeps well see :
Anyone to help me?



 
     
    