<%!
public String str2CN(String str)
{
try{
String temp1=str;
//byte[] temp2=temp1.getBytes("ISO8859_1");
//String temp=new String (temp2,"gb2312");
//自己喜欢哪个字符集之间转变,自己修改
byte[] temp2=temp1.getBytes("UTF-8");
String temp=new String (temp2,"GBK");
return temp;
}
catch(Exception Ex)
{
System.out.println("str2CN() Error:" + Ex.toString());
return null;
}
}
%>
public String str2CN(String str)
{
try{
String temp1=str;
//byte[] temp2=temp1.getBytes("ISO8859_1");
//String temp=new String (temp2,"gb2312");
//自己喜欢哪个字符集之间转变,自己修改
byte[] temp2=temp1.getBytes("UTF-8");
String temp=new String (temp2,"GBK");
return temp;
}
catch(Exception Ex)
{
System.out.println("str2CN() Error:" + Ex.toString());
return null;
}
}
%>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货