给你一个字符串,怎样获取它是按那种字符集编码的 不同的字符集,它应该有一个分配的编码范围吧?去Unicode标准的主页上看看吧.忘了是谁订的了. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 up以下//后面的是运行于windwos2K server 中文dos窗口的结果,javac没有带参数-encodeingtry{ System.out.println("朱镕基");//朱镕基 System.out.println("朱镕基".getBytes());//[B@ad3ba4 //请问这里的默认编码到底是什么?本机打印的系统属性中file.encodeing=GBK System.out.println("朱镕基".getBytes("GBK"));//[B@126b249System.out.println("朱镕基".getBytes("GB2312"));//[B@1690726 System.out.println("朱镕基".getBytes("ISO8859_1"));//[B@9931f5System.out.println();System.out.println(new String("朱镕基".getBytes()));//朱镕基System.out.println(new String("朱镕基".getBytes(),"GBK"));//朱镕基 System.out.println(new String("朱镕基".getBytes(),"GB2312"));//朱?F基 System.out.println(new String("朱镕基".getBytes(),"ISO8859_1"));//?ìéF?ù System.out.println();System.out.println(new String("朱镕基".getBytes("GB2312")));//朱?基 System.out.println(new String("朱镕基".getBytes("GBK")));//朱镕基 System.out.println(new String("朱镕基".getBytes("GB2312"),"GB2312"));//朱?基 System.out.println(new String("朱镕基".getBytes("GB2312"),"ISO8859_1"));//?ì??ùSystem.out.println();System.out.println(new String("朱镕基".getBytes("ISO8859_1")));//??? System.out.println(new String("朱镕基".getBytes("ISO8859_1"),"GBK"));//??? System.out.println(new String("朱镕基".getBytes("ISO8859_1"),"GB2312"));//??? System.out.println(new String("朱镕基".getBytes("ISO8859_1"),"ISO8859_1"));//??? } catch(Exception e){ e.printStackTrace(); } 外部类产生了多少个实例,内部类就被定义了多少次? String类型的对象是常量应该怎么理解 java编程思想第四版中文版有PDF的么? treemap 排序问题 JAVA五子棋的问题........ 哪位高人有好办法能算出当前CPU最大支持工作线程数????? 彩色验证码的问题??????研究了几天未果。。。 高手看看下面的代码哪里错了 怎样才能让jb7支持滚轮! 新手,请问这个程序错在哪儿? JAVA初学者,希望大家给点帮助 请问java的多语言支持问题
以下//后面的是运行于windwos2K server 中文dos窗口的结果,javac没有带参数-encodeing
try{
System.out.println("朱镕基");//朱镕基
System.out.println("朱镕基".getBytes());//[B@ad3ba4 //请问这里的默认编码到底是什么?本机打印的系统属性中file.encodeing=GBK
System.out.println("朱镕基".getBytes("GBK"));//[B@126b249
System.out.println("朱镕基".getBytes("GB2312"));//[B@1690726
System.out.println("朱镕基".getBytes("ISO8859_1"));//[B@9931f5
System.out.println();
System.out.println(new String("朱镕基".getBytes()));//朱镕基
System.out.println(new String("朱镕基".getBytes(),"GBK"));//朱镕基
System.out.println(new String("朱镕基".getBytes(),"GB2312"));//朱?F基
System.out.println(new String("朱镕基".getBytes(),"ISO8859_1"));//?ìéF?ù
System.out.println();
System.out.println(new String("朱镕基".getBytes("GB2312")));//朱?基
System.out.println(new String("朱镕基".getBytes("GBK")));//朱镕基
System.out.println(new String("朱镕基".getBytes("GB2312"),"GB2312"));//朱?基
System.out.println(new String("朱镕基".getBytes("GB2312"),"ISO8859_1"));//?ì??ù
System.out.println();
System.out.println(new String("朱镕基".getBytes("ISO8859_1")));//???
System.out.println(new String("朱镕基".getBytes("ISO8859_1"),"GBK"));//???
System.out.println(new String("朱镕基".getBytes("ISO8859_1"),"GB2312"));//???
System.out.println(new String("朱镕基".getBytes("ISO8859_1"),"ISO8859_1"));//???
}
catch(Exception e){
e.printStackTrace();
}