Wednesday, 15 January 2014

internet explorer 7 - Open a file (not download) within IE7, filename is unicode-encoded -



internet explorer 7 - Open a file (not download) within IE7, filename is unicode-encoded -

i'm using java application that's encoded in utf-8. when download file in application, filename normal (filename: 일자별_주문_내역.xls). when open file ie7, filename in unicode (filename: %ec%90%bc%ec%9e....). when opening file within ie8, filename normal.

filename = urlencoder.encode(filename, "utf-8"); if(useragent.indexof("safari") > -1){ filename = "filename=" + filename + ".xls"; } else if(useragent.indexof("msie") > -1){ filename = "filename=" + filename + ".xls"; } else{ filename = "filename*=utf-8\'\'" + filename + ".xls"; } response.setheader("content-disposition", "attachment;" + filename); response.setcontenttype("application/vnd.ms-excel; charset=utf-8"); response.setheader("content-descriptioin", "excel download");

unicode internet-explorer-7 filenames

No comments:

Post a Comment