File tempfile = new File(fullName); //jsp文件名
FileOutputStream fout = new FileOutputStream(tempfile);
//不加下面语句访问时显示乱码
content = "<%@ page contentType=\"text/html; charset=UTF-8\" %>\r\n"+content;
fout.write(content.getBytes());
fout.close(); 能否将UTF-8转化为gb2312保存在linux服务器上,然后url访问不是乱码?谢谢各位大侠
text=new String(text.getBytes("UTF-8"),"gb2312");
你试试这个吧