日期:2014-05-18  浏览次数:20735 次

急, 关于乱码的处理
struct-config.xml  

<controller   contentType= "text/html;charset=UTF-8 "   nochache   = "true "   />  
是这样设置的吗

问题是现在提交还是乱吗


页面指定了   <%@   page   contentType= "text/html;   charset=utf-8 "   language= "java "   import= "java.sql.* "   errorPage= " "   %>

而且
<form       name= "fmdetail "   id= "fmdetail "   acceptCharset= "UTF-8 "   ACCEPT-CHARSET   = "utf-8 "     enctype= "application/x-www-form-urlencoded "   method= "post "   action= "../test/insert.do ">


怎么在ACTION里显示的还是乱码??



------解决方案--------------------
<%@ page import= "java.sql.*,java.util.* " contentType= "text/html;charset=GBK "%>
------解决方案--------------------
过滤器,常见的乱码问题,
------解决方案--------------------
<%@ page contentType= "text/html; charset=GBK " %>
<% request.setCharacterEncoding( "GB2312 ");%> //转换由表单读取的数据的内码到GB2312
<form> 里面就不要设了