转载自:http://blog.csdn.net/mmm333zzz/article/details/7962210
-
String fileName = request.getParameter("fileName");
-
-
if (request.getHeader("User-Agent").toLowerCase()
-
.indexOf("firefox") > 0) {
-
fname = new String(fileName.getBytes("UTF-8"), "ISO8859-1");
-
} else if (request.getHeader("User-Agent").toUpperCase()
-
.indexOf("MSIE") > 0) {
-
fname = URLEncoder.encode(fileName, "UTF-8");
-
}else if (request.getHeader("User-Agent").toUpperCase()
-
.indexOf("CHROME") > 0) {
-
fname = new String(fileName.getBytes("UTF-8"), "ISO8859-1");
-
}
阅读(1394) | 评论(0) | 转发(0) |