lundi 22 juin 2015

jersey ResponseBuilder filename encoding

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 response = Response.ok(file);
response.header("Content-Disposition", "attachment; filename=żółty.txt");

After this, file is being downloaded as "-óBty.txt". How to fix this?

Aucun commentaire:

Enregistrer un commentaire