public class Atranslate {
public static void main(String[] args) {
String str = "aa" ;
str =translate( str) ;
System.out.print(str);
}
private static String translate(String str) {
String tempStr = "" ;
try {
tempStr = new String(str.getBytes("ISO-8859-1"),"GBK");
tempStr = tempStr.trim();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return tempStr;
}
}
public static void main(String[] args) {
String str = "aa" ;
str =translate( str) ;
System.out.print(str);
}
private static String translate(String str) {
String tempStr = "" ;
try {
tempStr = new String(str.getBytes("ISO-8859-1"),"GBK");
tempStr = tempStr.trim();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return tempStr;
}
}