/**
* 转化源编码的字符串为目标编码。
*
*@param source Description of the Parameter
*@param sourceCodeset Description of the Parameter
*@param targetCodeset Description of the Parameter
*@return java.lang.String
*/
public final static String translate( String source, String sourceCodeset,
String targetCodeset )
{
String out; try
{
out = new String( source.getBytes( sourceCodeset ), targetCodeset );
}
catch ( Exception ex )
{
out = "";
} return out;
}改传translate( "参数", "iso-8859-1", "GBK" )进去吧
* 转化源编码的字符串为目标编码。
*
*@param source Description of the Parameter
*@param sourceCodeset Description of the Parameter
*@param targetCodeset Description of the Parameter
*@return java.lang.String
*/
public final static String translate( String source, String sourceCodeset,
String targetCodeset )
{
String out; try
{
out = new String( source.getBytes( sourceCodeset ), targetCodeset );
}
catch ( Exception ex )
{
out = "";
} return out;
}改传translate( "参数", "iso-8859-1", "GBK" )进去吧
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货