//中文转换为unicode
  public String ChineseStringToAscii(String s) {
    try {
      CharToByteConverter toByte = CharToByteConverter.getConverter("gb2312");
      byte[] orig = toByte.convertAll(s.toCharArray());
      char[] dest = new char[orig.length];
      for (int i=0;i<orig.length;i++)
        dest[i] = (char)(orig[i] & 0xFF);
      return new String(dest);
    }
    catch (Exception e) {
      System.out.println(e);
      return s;
    }
  }
  //unicode转换为中文
  public static String AsciiToChineseString(String s) {
    char[] orig = s.toCharArray();
    byte[] dest = new byte[orig.length];
    for (int i=0;i<orig.length;i++)
      dest[i] = (byte)(orig[i]&0xFF);
    try {
      ByteToCharConverter toChar = ByteToCharConverter.getConverter("gb2312");
      return new String(toChar.convertAll(dest));
    }
    catch (Exception e) {
      System.out.println(e);
      return s;
    }
  }