String strs = request.getParameter("yourstrs");
byte b[] = strs.getBytes("ISO-8859-1");
strs = new String(b);
簡潔寫法:
String convert = new String(request.getParmater("inputname").trim().getBytes("ISO8859_1"), "GBK");
posted on 2006-11-10 09:53
崛起的程序員 閱讀(240)
評論(0) 編輯 收藏