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?
EDIT: Whole application works properly with UTF-8 (json content contains polish characters for example). Only http headers doesn't.