乱码测试,我就不相信没一个被我给逮着的!呵呵!写出来共大家参考!
String name =request.getParameter("name");// ;
System.out.println(name);//1
System.out.println(name.getBytes());//2
System.out.println(name.getBytes("utf-8"));//3
System.out.println(name.getBytes("ISO8859_1"));//4
System.out.println(new String(name.getBytes()));//5
System.out.println(new String(name.getBytes(),"utf-8"));//6
System.out.println(new String(name.getBytes(),"ISO8859_1"));//7
System.out.println(new String(name.getBytes("utf-8")));//8
System.out.println(new String(name.getBytes("utf-8"),"utf-8"));//9
System.out.println(new String(name.getBytes("utf-8"),"ISO8859_1"));//10
System.out.println(new String(name.getBytes("ISO8859_1")));//11
System.out.println(new String(name.getBytes("ISO8859_1"),"utf-8"));//12
System.out.println(new String(name.getBytes("ISO8859_1"),"ISO8859_1"));//13
System.out.println("****************************************************************");//1
System.out.println(name.getBytes());//2
System.out.println(name.getBytes("GB2312"));//3
System.out.println(name.getBytes("ISO8859_1"));//4
System.out.println(new String(name.getBytes()));//5
System.out.println(new String(name.getBytes(),"GB2312"));//6
System.out.println(new String(name.getBytes(),"ISO8859_1"));//7
System.out.println(new String(name.getBytes("GB2312")));//8
System.out.println(new String(name.getBytes("GB2312"),"GB2312"));//9
System.out.println(new String(name.getBytes("GB2312"),"ISO8859_1"));//10
System.out.println(new String(name.getBytes("ISO8859_1")));//11
System.out.println(new String(name.getBytes("ISO8859_1"),"GB2312"));//12
System.out.println(new String(name.getBytes("ISO8859_1"),"ISO8859_1"));//13
阅读(1345) | 评论(0) | 转发(0) |