我知道两中转换为中文的方法,如下1.不知道这种方法为什么不行
String utf8_value = "请输入用户名";
b = utf8_value.getBytes ( "ISO8859_1" );
String name = new String ( b , "GB2312" );
2.这个方法能够成功
String trans ( String chi )
{
String result = null;
byte temp [ ];
try
{
temp = chi.getBytes ( "gb2312" );
result=new String ( temp );
}
catch ( UnsupportedEncodingException exp )
{
}return result;}希望大家说点自己的观点和另外的实现方法,还有就是1为什么不行呀?