import java.io.UnsupportedEncodingException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class TestUnicode {
public static void main(String[] args) throws UnsupportedEncodingException {
String aa="我";
byte[] aag = aa.getBytes("gbk");
System.out.println("\"我\"gbk对应的的二进制:");
for(byte aag1:aag){
//System.out.println(aag1);
System.out.println(Integer.toHexString(aag1 & 0xFF));
}
System.out.println("*******前后两种不同编码********************");
System.out.println("\"我\"utf8对应的的二进制:");
byte[] aau = aa.getBytes("utf8");
for(byte aau1:aau){
//System.out.println(aau1);
System.out.println(Integer.toHexString(aau1 & 0xFF));
}
System.out.println("通过二进制数据还原字符");
byte[] bbg={(byte