转换编码:public String toChinese(String strvalue)
{
try{
if(strvalue==null)
return null;
else
{
strvalue = new String(strvalue.getBytes("ISO8859_1"), "GBK");
return strvalue;
}
}
catch(Exception e)
{
return null;
}
}
{
try{
if(strvalue==null)
return null;
else
{
strvalue = new String(strvalue.getBytes("ISO8859_1"), "GBK");
return strvalue;
}
}
catch(Exception e)
{
return null;
}
}
它能进行编码转换
new InputStreamReader(new FileInputStream(strInFile),"GB2312"); Writer out =
new OutputStreamWriter(new FileOutputStream(strOutFile), "GB2312");