日期:2014-05-20  浏览次数:20674 次

想实现中文字符的转换。大家帮我看下
public   class   String   Convert
{
public   String   getString(String   str)
{
try{
String   temp_p=str;
String   temp=new   String(temp_p.getBytes( "iso-8859-1 "),( "gb2312 ");
return   temp;
}
catch(Exception   e){}
return   "NULL ";
}
}

谢谢

------解决方案--------------------
public class String Convert
{
public String getString(String str)
{
try{
String temp=new String(str.getBytes( "iso-8859-1 "),( "gb2312 ");
return temp;
}
catch(Exception e){}
return null;
}
}