serlvet输出csv文件乱码问题

在文件最前面加一句

out.write(0xFEFF);

resp.setContentType("application/x-xls");
resp.setHeader("Content-disposition", "attachment;filename=" + name+ ".csv");
out.write(0xFEFF);
out.print(csv);

你可能感兴趣的:(http,servlet,content,disposition)