Linked Questions
124 questions linked to/from How to encode the filename parameter of Content-Disposition header in HTTP?
5 votes
1 answer
3k views
jersey ResponseBuilder filename encoding [duplicate]
In javax.ws.rs.core.Response.ResponseBuilder, when I set filename, with polish (german, french, etc.) national characters, it changes file name before response is sent to client: ResponseBuilder ...
5 votes
1 answer
2k views
Force download with Swedish characters (åäö) filename [duplicate]
I use the following code and function to force download files and it works great if the file name is not holding Swedish characters like Å Ä Ö. $file_id = $_GET['f']; $sql = " SELECT * ". ...
0 votes
0 answers
237 views
How to generate valid filename with unicode characters for download? [duplicate]
I add Content-Disposition header to generate filename for download. self.response.headers['Content-Type'] = 'text/xml' self.response.headers['Content-Disposition'] = 'attachment; filename=' + os....
0 votes
2 answers
485 views
How to download file name with chinese word in c#? [duplicate]
Here is my code : Response.StatusCode = (int)HttpStatusCode.OK; Response.Headers.Add(HeaderNames.ContentDisposition, "attachment; filename=\"你好.zip\""); It occurs 500 error ...
0 votes
0 answers
59 views
Input Unicode string in String.Format() method; [duplicate]
I want to input Unicode string in String.Format() method. This is my code: string filename = String.Format("Това трябва да е уникод {0}_{1}.doc", wayBillNum, DateTime.Now.ToShortDateString()); //...
0 votes
0 answers
44 views
Change OutputStream name before flush [duplicate]
I have a problem with outputstream, I have this Java Spring code: @RequestMapping(value="/downloadZip", produces="application/zip") public void downloadZip(HttpSession session,...
567 votes
25 answers
339k views
How do I remove diacritics (accents) from a string in .NET?
I'm trying to convert some strings that are in French Canadian and basically, I'd like to be able to take out the French accent marks in the letters while keeping the letter. (E.g. convert é to e, so ...
275 votes
15 answers
196k views
Having Django serve downloadable files
I want users on the site to be able to download files whose paths are obscured so they cannot be directly downloaded. For instance, I'd like the URL to be something like this: http://example.com/...
421 votes
2 answers
376k views
Unicode, UTF, ASCII, ANSI format differences
What is the difference between the Unicode, UTF8, UTF7, UTF16, UTF32, ASCII, and ANSI encodings? In what way are these helpful for programmers?
146 votes
12 answers
231k views
How to get file name from content-disposition
I downloaded a file as response of ajax. How to get the file name and file type from content-disposition and display thumbnail for it. I got many search results but couldn't find right way. $("....
78 votes
19 answers
304k views
How to start automatic download of a file in Internet Explorer?
How do I initialize an automatic download of a file in Internet Explorer? For example, in the download page, I want the download link to appear and a message: "If you download doesn't start ...
71 votes
11 answers
37k views
Serving dynamically generated ZIP archives in Django
How to serve users a dynamically generated ZIP archive in Django? I'm making a site, where users can choose any combination of available books and download them as ZIP archive. I'm worried that ...
154 votes
2 answers
90k views
How to set response filename without forcing "save as" dialog
I am returning a stream in some response setting the appropriate content-type header. The behavior I'm looking for is this: If the browser is able to render content of the given content type then it ...
54 votes
4 answers
30k views
How to set filename containing spaces in Content-Disposition header
I have this piece of code: resp.addHeader("Content-Disposition", "inline; filename=" + fileName); When the file name is "a_b_c.doc" or "abc.doc" the name of the downloaded file is displayed correctly....
43 votes
3 answers
51k views
How to get the filename from a file downloaded using JavaScript Fetch API?
In my Javascript client, I'm using Fetch API to call the server to retrieve a server-generated file. I'm using the following client-side code: var _url = ""; var initParms = { ...