试下用<%
public String getStr(String str)
{
try
{
String temp_t=str;
byte[] temp_p=temp_t.getBytes("ISO8859_1");
String temp=new String(temp_t);
return temp;
}
catch(Exception e)
{
}
return "null";
}
%><%
??=getStr(request.getParameter(??));
然后写进数据库...%>
public String getStr(String str)
{
try
{
String temp_t=str;
byte[] temp_p=temp_t.getBytes("ISO8859_1");
String temp=new String(temp_t);
return temp;
}
catch(Exception e)
{
}
return "null";
}
%><%
??=getStr(request.getParameter(??));
然后写进数据库...%>
你说的功能用一句话就可以实现:request.setCharacterEncoding("gb2312")
这样从一个网页传过来的中文字符串参数就可以正常显示,但是写到数据库里还是乱马。谁来帮帮楼主啊,楼主都疲了