wertzui Posted March 3, 2015 Report Share Posted March 3, 2015 When i have a link like this:click methe file will be downloaded using utf-8 and not using windows-1252 encoding. If you have Excel, you can clearly see this, as Excel will open any csv file using ANSI (for me that is windows-1252) Encoding. So you can see that the chars are not encoded right. If you are not on a computer where ANSI is windows-1252, try it with your local ANSI codepage. Link to comment Share on other sites More sharing options...
SWFlash0 Posted March 3, 2015 Report Share Posted March 3, 2015 This worked for me:data:text/csv;charset=windows-1252,%FC;%E4;%F6This also works:data:text/csv;charset=windows-1252;base64,/DvkO/Y= Link to comment Share on other sites More sharing options...
wertzui Posted March 3, 2015 Author Report Share Posted March 3, 2015 Yes, it will generate a downloadable file. But the encoding of the file is always utf-8. I created a fiddle here: http://jsfiddle.net/3vqr1djt/ When I open the file using windows-1252 Encoding (open with Excel, as it will ignore that the file is utf-8), it will display: ü ä ö When i open the file with Notepad, it detects that the file is utf-8 and will display using utf-8 encoding: ü;ä;ö So the file download is working, but the charset is ignored and utf-8 is always used. Link to comment Share on other sites More sharing options...
Recommended Posts