Umlauts in mail csv-attachment content

Hi, I am sending me log files every day as backup.
If I am sending it as csv there are problems with the encoding and all umlauts like ö,ä,ü and so on arent readable.
If I am sending the same text as .txt it works.

The file which I save with NodeRed works too.

The Input looks like:

{"Alarmnummer":"032","Schrittzaehler":0,"IDALL":0,"Reihungszeit":20,"Alarmtext":"24V_Störung","aktiv":false,"deactivate":false,"deactivatedate":"26.11.2021"}, {"Alarmnummer":"033","Schrittzaehler":0,"IDALL":0,"Reihungszeit":20,"Alarmtext":"Batterie MIN","aktiv":false,"deactivate":false,"deactivatedate":"26.11.2021"},

My code for the attachments look like this:

for(var i=0;i<msg.payload.length;i++)
    attachments.push({filename:msg.payload[i].path.substring(    msg.payload[i].path.lastIndexOf("/") + 1,     msg.payload[i].path.lastIndexOf("."))+".txt",content:msg.payload[i].payload.replace(/},/g, "},\n")});



Is there a solution?

After my research I know now, that it is an Excel problem. Excel want to have "windows-1252" and I am reading it as utf-8. Is there a way to code it in windows-1252?