(相关资料图)
1、关于中文乱码问题有很多种解决方法的,首先可以查看页面的字符标准,一般采用gb2312 如果不能解决。
2、可以通过修改server.xml文件 如果还不能解决,可以自己编写中文乱码处理函数 <%!String trans(String chi) { String result=null; byte temp[]; try { temp=chi.getBytes("iso-8859-1"); result=new String(temp); } catch(UnsupportedEncodingException e) { System.out.println(e.toString()); } return result; } %。
本文到此分享完毕,希望对大家有所帮助。
关键词: