expressjs下载文件名utf-8

express response.download文件名不支持utf-8。

我想下载文件,文件命名utf-8(不是英文)

我已经尝试将Content-Disposition设置为标题

喜欢这个…

 res.set "Content-Disposition", "attachment;filename=테스트 한글.hwp" 

但不工作…

 var newFileName = encodeURIComponent("테스트 한글.hwp"); res.setHeader('Content-Disposition', 'attachment;filename*=UTF-8\'\''+newFileName); 

这应该做的伎俩。 它帮助我用波兰语的变音符号。 注意= UTF-8 \'部分。

尝试这个。 res.set“Content-Disposition”,“attachment; filename =”+ encodeURI(“테스트한글.hwp”);