Broken encoding in Excel report from Java -
in application user able download excel report. when user downloads xls using ff encoding fine , umlauts shown correct. if user same in ie , chrome umlauts in xls broken.
excel report generated in servlet using apache poi v3.10.1 , filled same data every time. xls files downloaded in ff , ie (or chrome) different.
any idea why?
btw, tried set encoding in response header
response.setheader("content-type", "application/vnd.ms-excel; charset=utf-8");
but no success.
upd 03.04. piece of code servlet:
outputstream out = response.getoutputstream(); ... response.setcontenttype("application/vnd.ms-excel"); response.setheader("content-disposition", "attachment; filename=\"" + filename + ".xls" + "\""); ... workbook.write(out);
ie somehow cannot understand response.setheader("content-type", "application/vnd.ms-excel; charset=utf-8");
. try instead response.setcontenttype("application/vnd.ms-excel");
. works on ie8 , ff35.
Comments
Post a Comment