I am sending to the browser a request to save a file with the file name.
The file name might include spaces, so i replace all spaces with %20
.
Internet Explorer and Chrome transfers %20
back to spaces, but Firefox does not to that. why?
Is there a way make all browsers show the space?
This is my code:
String codedName = new String(URLEncoder.encode(name, "UTF-8"));
codedName = codedName.replaceAll("\\+", "%20");
response.setHeader("Content-Disposition", "attachment; filename=\"" + codedName+ "\"");