public class MyChinese {
? public static String Decode(String s) {
??? try {
????? return new String(s.getBytes("ISO8859_1"), "gb2312");
??? }
??? catch (Exception e) {
????? return s;
??? }
? }
? public static String Encode(String s) {
??? try {
????? return new String(s.getBytes("gb2312"), "ISO8859_1");
??? }
??? catch (Exception e) {
????? return s;
??? }
? }
}