I am trying to download file whose name is in Arabic language. Content of file is in arabic but name gets encrypted on download.
responseBuilder.header("Content-Disposition",
"attachment; filename=\"" + fileName + "\"; filename*=utf-8''" + URLEncoder
.encode(fileName, "UTF-8"));
fileName at this point is in Arabic language but on browser's response Header fileName gets changed to something else like E1-(E1-(.txt
Http Response Header:
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 10
Content-encoding: gzip
Connection: keep-alive
Cache-Control: private
Content-Disposition: attachment; filename="E1-(E1-(.txt.txt";
filename*=utf-8''%D9%85%D8%B1%D8%AD%D8%A8%D8%A7.txt
Expires: Mon, 26 Jul 1997 05:00:00 GMT
X-Backend: supra-prod-pdx-ff4d74bff-7srf7
X-Content-Type-Options: nosniff
X-Robots-Tag: noindex
X-Slack-Meta: proxy
Thank you in advance.