public static String unicodeToGB(String l_S_Source)
throws UnsupportedEncodingException
{
String l_S_Desc = "";
if(l_S_Source != null && !l_S_Source.trim().equals(""))
{
byte l_b_Proc[] = l_S_Source.getBytes("GBK");
l_S_Desc = new String(l_b_Proc, "ISO8859_1");
}
return l_S_Desc;
}
throws UnsupportedEncodingException
{
String l_S_Desc = "";
if(l_S_Source != null && !l_S_Source.trim().equals(""))
{
byte l_b_Proc[] = l_S_Source.getBytes("GBK");
l_S_Desc = new String(l_b_Proc, "ISO8859_1");
}
return l_S_Desc;
}
out.print(word);
现在word就是gb的了
感谢你贴出的例程,能解释一下"ISO8859_1"的意思吗,我在帮助中查到的是"ISO-8859-1"
同样感谢你贴出的例程,不过在你的例程中源字符串是在那里输入的啊!