express response.download filename is not support utf-8.
I wanna download file, file naming utf-8 (not english)
I already try Content-Disposition
set to header
like this...
res.set "Content-Disposition", "attachment;filename=테스트 한글.hwp"
but not working...
Try this:
res.set("Content-Disposition", "attachment;filename=" + encodeURI("테스트 한글.hwp"));
var newFileName = encodeURIComponent("테스트 한글.hwp");
res.setHeader('Content-Disposition', 'attachment;filename*=UTF-8\'\''+newFileName);
This should do the trick. It helps me with polish diacritics. Note the =UTF-8\'\' part.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With